The line-height property specifies the height of an inline element.

  • Initial valuenormal
  • Applies toAll elements
  • InheritedYes
  • MediaVisual
  • Computed valueFor <length> and <percentage> the absolute value; otherwise as specified
  • AnimatableYes
  • CSS VersionCSS1, CSS2, CSS3
  • JavaScript syntaxobject.style.lineHeight
Formal syntax: normal | <number> | <length> | <percentage> | none

line-height: normal; 
line-height: 2;         /* Number value */
line-height: 1.5em;     /* Length value */
line-height: 24%;       /* Percentage value */
  • normalDepends on the user agent. Desktop browsers use a default value of roughly 1.2, depending on the element's font-family.
  • <length>The box height is set to this length. Negative values are illegal. The length is the computed value.
  • <number>The computed value of the property is this number multiplied by the element's font size. Negative values are illegal. However, the number, not the computed value, is inherited.
  • <percentage>The computed value of the property is the percentage multiplied by the element's computed font size. Negative values are illegal.
  • inherit
.class {
   line-height: 1.2em;
   font-size: 10pt;
}
1+Firefox6+Explorer1+Chrome1+Safari8+Opera


Last updated on 23rd March 2014 By Rene Spronk

View All CSS Properties

Errors? Please help to keep this list up to date, If you find any errors, please contact us, so that we can get them fixed.