Sets or retrieves the distance between lines in the object.
line-height: normal | number | length | percentage | inherit
Default. Default height.
The used value is this number multiplied by the element's font size. Negative values are ignored.
Floating-point number, followed by an absolute units designator (
pc) or a relative units designator (
px). For more information about the supported length units, see CSS Values and Units Reference.
Integer, followed by a percent sign (%). The value is a percentage of the height of the parent object.
For a given element, the property takes the same specified value as the property for the element's parent.
|Applies To||All elements|
- CSS 2.1, Section 5.4.8
Line height is the distance between the descender of the font and the top of the internal leading of the font.
If a formatted line contains more than one object, the maximum line height applies. In this case, negative values are not allowed.
Microsoft Internet Explorer 3.0 supports the line-height attribute through the font attribute.
The following examples use the line-height attribute and the line-height property to control the height of paragraph lines.
This example uses inline scripting to set the distance between lines when an onmouseover event occurs.