Set the line height for a <div> element:
The lineHeight property sets or returns the distance between lines in a text.
The lineHeight property is supported in all major browsers.
Return the lineHeight property:
Set the lineHeight property:
Value | Description |
---|---|
normal | Normal line height is used. This is default |
number | A number that will be multiplied with the current font size to set the line height |
length | Defines the line height in length units |
% | Defines the line height in % of the current font size |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Default Value: | normal |
---|---|
Return Value: | A String, representing the distance between lines in the text |
CSS Version | CSS1 |
Return the line height of a <div> element:
CSS tutorial: CSS Text
CSS reference: line-height property