The line-height CSS property sets the height of a line box. It's commonly used to set the distance between lines of text. On block-level elements, it specifies the minimum height of line boxes within the element. On non-replaced inline elements, it specifies the height that is used to calculate line box height.


Initial value normal
Applies to all elements. It also applies to ::first-letter and ::first-line.


line-height: 2em;


Depends on the user agent. Desktop browsers (including Firefox) use a default value of roughly 1.2, depending on the element's font-family.
The used value is this unitless multiplied by the element's own font size. The computed value is the same as the specified . In most cases, this is the preferred way to set line-height and avoid unexpected results due to inheritance.
The specified is used in the calculation of the line box height. Values given in em units may produce unexpected results (see example below).
Relative to the font size of the element itself. The computed value is this multiplied by the element's computed font size. Percentage values may produce unexpected results (see the second example below).
Sets the line height to the content height of the current block.

Browser support


We use cookies to improve your experience. Learn more in our Privacy policy.