Example

A simple line-height property example:

Laboratory

description & Usage

To determine the height of a line, we use the line-height property.

Informations

# Description
Default Value normal
Inherited yes
Animatable yes
Version CSS1
JavaScript syntax object.style.lineHeight="30px"

Browser compatibility and Support

# Chrome Edge Firefox Safari Opera
line-height

Syntax

Values

Values Description
normal Determines a normal height.
number Determines numbers to multiply and determine the result.
length Determines the height in pixels, centimeters, etc.
% Determines the height in percentage.
initial Adds this value to its default property.
inherit It inherits this value from its parent tag.