• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 9. Styling Text > Setting Line Height

Setting Line Height

Referred to in traditional typography as leading, line height is the space between each line in a section of text. CSS enables you to control this using the line-height property, with length, number, or percentage values (see Example 9-7).

Example 9-7. Adding line height to paragraphs with length, number, and percentage

<p style="line-height: 20px;">I married early, and was happy to find in my wife a
disposition not uncongenial with my own. </p>
<p style="line-height: 2;">Observing my partiality for domestic pets, she lost no 
opportunity of procuring those of the most agreeable kind. We had birds, gold
fish, a fine dog, rabbits, a small monkey, and a cat.</p>
<p style="line-height: 65%;">This latter was a remarkably large and beautiful
animal, entirely black, and sagacious to an astonishing degree.</p>

					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint