line-height

Sets the distance between lines in the object.

Syntax

{ line-height: sHeight }

Possible values

sHeight

Variant that specifies one of the following values:

normal

Default. Default height.

height

Floating-point number followed by an absolute units designator (cm, mm, in, pt, or pc) or a relative units designator (em, ex, or px).

For more information about the supported length units, see Length units reference.

percentage

Integer, followed by a percent sign (%). The value is a percentage of the height of the parent object.

The property has a default value of normal. The cascading style sheet property is not inherited.

Remarks

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.

Examples

The following example uses the line-height property to control the height of paragraph lines. This example uses the p and blockquote elements as selectors in an embedded (global) style sheet to change the distance between the lines in all p and blockquote element objects:

<style>
    p {line-height:8mm}
    blockquote {line-height:4mm}
</style>

Standards information

This property is defined in Cascading Style Sheets (CSS), Level 1 (CSS1) Ee371218.xtlink_newWindow(en-us,Expression.40).png.

Applies to

a, address, b, big, blockquote, body, button, caption, center, cite, code, col, colgroup, custom, dd, defaults, dfn, div, dl, dt, em, fieldset, form, hn, html, i, img, input type=button, input type=checkbox, input type=file, input type=image, input type=password, input type=radio, input type=reset, input type=submit, input type=text, li, ol, p, s, select, span, sub, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, var, xmp

See also

Concepts

font
font-size

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.