CSS line-height Property
The line-height property sets the line height of content - the line height being the distance between lines of text.
Possible Values
- normal - a normal line height - the default value.
- percentage - a percentage of the current font size.
- number - a number which is multiplied by the current font size to give the line height.
- A length value:
- em - relative unit - the width of the 'font-size' of the font in use.
- ex - relative unit - the height of the letter 'x' in the current font.
- in - absolute unit - inches.
- mm - absolute unit - miilimeters.
- cm - absolute unit - centimeters.
- pt - absolute unit - points - a point is 1/72nd of an inch.
- pc - absolute unit - picas - one pica = 12 pt.
- px - absolute unit - pixel - one pixel = 0.75 pt.
- inherit - the value is inherited from the parent element.
Examples:
p{line-height: 0.8}
The line-height in this paragraph has been set using a number value of 0.8.The line-height in this paragraph has been set using a number value of 0.8.The line-height in this paragraph has been set using a number value of 0.8.The line-height in this paragraph has been set using a number value of 0.8.
p{line-height: 3em}
The line-height in this paragraph has been set using a length value of 3em.The line-height in this paragraph has been set using a length value of 3em.The line-height in this paragraph has been set using a length value of 3em.The line-height in this paragraph has been set using a length value of 3em.
