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 adisposition 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, goldfish, a fine dog, rabbits, a small monkey, and a cat.</p><p style="line-height: 65%;">This latter was a remarkably large and beautiful ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access