What is Line Height?
Line Height is a CSS attribute that changes the amount of space between lines of text. It is useful mainly for decorative text and formatting and useful when you have large or overlapping text.
How to use Line Height
To use Line Height, type in:
line-height:__px
Fill in the blank with a number. The higher the number, the farther apart lines of text are. Line height can also be paired with Fonts, Text Color, and other CSS Attributes.
Examples
Line One
Line Two
Line Two
The code for this:
<div style="line-height: 50px; color: purple; font-family: lobster">Line One<br>Line Two</div>
Line one
Line two
Line two
See how the two lines are actually overlapping? This is because the number specified in this example's line height is VERY low. The default line height is around 15-20px.
The code for this:
<div style="line-height: 1px; color: green"><u>Line one<br>Line two</div></u>
Line One
Line Two
Line Two
The code for this:
<div style="line-height:300px">Line One<br>Line Two</div>