NOTICE: This website is no longer updated or supported - as such many of the techniques used to build it may seem antiquated in the modern day. It is preserved for historical reasons only.

HTML XHTML The Complete Reference
home » reference » appendix b » css1 / css2 properties


This property sets the height (leading) between lines of text in a block-level element such as a paragraph. Values can be specified as a number of lines, a number of units (pixels, points, inches, centimeters, and so on), or a percentage of the font size. This property is often used in conjunction with the font-size property. Alternatively, the line-height can be set through the shorthand font property.


.double {line-height: 2;}
p {font-size: 14px; line-height: 16px;}
p.norm {line-height: normal;}
body {line-height: 4ex;}
div {line-height: 125%;}

Browser and CSS Support Notes

IE 3, 4, 5, 5.5, 6
Nav 4, 4.5-4.7 (some problems
with number of lines value), 6, 7
Opera 4, 5, 6, 7

(X)HTML Elements
CSS Properties
Back: letter-spacing Next: list properties
< Home | About | Chapters | Examples | Errata | Reference | Site Map >