Set line spacing

Moon picture Moon · Oct 2, 2010 · Viewed 398.4k times · Source

How can I set line spacing with CSS, like we can set it in MS Word?

Answer

Mario Cesar picture Mario Cesar · Oct 2, 2010

Try the line-height property.

For example, 12px font-size and 4px distant from the bottom and upper lines:

line-height: 20px; /* 4px +12px + 4px */

Or with em units

line-height: 1.7em; /* 1em = 12px in this case. 20/12 == 1.666666  */