CSS2 » Properties » line-height

Version: Level 1

Compability: IE4+  N4+

Syntax:
line-height : normal | number | length | percentage
percentage
The percentage value is based upon the normal line height being defined as 100%. A percentage value below 100% decreases the line height, 100% causes no change, and a value greater than 100% increases the line height.
length
The length value can be in any of the following seven units. Use the abbreviation.
 
Length Abbrev.
centimeters cm
ems em
inches in
millimeters mm
picas pc
pixels px
points pt
number
The number value is multiplied times the font size to get the line-height dimension.
normal
The normal value is the default. By declaring normal, you can ensure that any previous declaration will not effect line-height.

The line-height property defines the distance between adjacent lines. This distance is based upon the size of the font. This property is inherited.

Examples

Code:
p { line-height: normal; }
p { line-height: 1.25; }
br { line-height: 1.5in; }
blockquote { line-height: 85%; }
Language(s): CSS2
Code:
<span style="line-height: 30px;">
DevGuru<br>
is great!
</span>
Output:
DevGuru
is great!
Language(s): CSS2

See Also: