HTML and CSS Reference
In-Depth Information
Checking out the new line height
As you might have guessed, the line-height property allows you to specify the
amount of vertical space between each line of your text. Like other font-related
properties, you can specify the line height in pixels, or using an em or percent
value that's relative to the font size.
Let's see what the effect of the line-height property is on the lounge. Make
sure you add the line-height property to your CSS file and then save. You
should see the line height increase when you refresh.
The line-heigh t property is inhe rited, so by
setting it in t he body, all the e lements on the
page now have a line height of 1.6em.
Try a few different values for line-height, like 200%, .5em, and 20px to see the
effect. Which looks the best? The worst? Which is most readable? When you're
done, make sure you change the line-height back to 1.6em.
 
Search WWH ::




Custom Search