With top lane, I find it very important to know when your champion is strong. What levels specifically are good to trade at and what levels are not. You should probably have a strategy surrounding that too.
Fiora and Riven for example are both very powerful at level 3 when they get all their skills together. Irelia by contrast is powerful at level 5 or 7 as she levels up Hiten Style. Therefore Fiora and Riven may come to the lane with damage items and ignite and try to get a kill very early while Irelia comes to lane with a pile of potions and teleport and mostly tries to farm, throwing back harass with her E.
Next thing is: mind the number of creeps closely. Melee characters take a lot more damage from creeps than ranged. Don't ever try to trade when you have a creep disadvantage. Let the wave push to your tower and farm it there, while making clear the enemy has made themselves open to a gank. Alternatively learn to take advantage of this and auto creeps to push the lane yourself, preferably while keeping a ward up.
You should be aware of your objective top as well. Not every character is there to win the lane. Malphite for example doesn't give a damn. At 6, he's looking to tp bot and gank. Until then he just pokes away and endures. Nasus goes there to stack. Tryndamere wants to push. Teemo wants to be annoying as F$%^. Don't brawl with an opponent if you don't want to and don't have to. Whereas if you're Riven and want early kills, be aggressive.
Finally, don't hesitate to counter build. Many losing matchups top can be stalemated by building defensively. Buying a ton of potion is sometimes necessary. I even once had a game as Malphite against a Nasus; Nasus though he had a free ticket to stack all game. I rushed a thornmail and when I got it he got a rude surprise when he learned Malphite could now out duel him.