Syntax | selector {line-height: value;}
|
---|---|
Usage | The line-height property is used to specify the line height. This property is specified by using a number, length, percentage, or keyword, according to the syntax shown above. Values cannot be negative.
CSS Example: The line-height properties are set using a number, length, percentage, and a keyword. #tst1 {line-height: 1.8; background-color: yellow;} #tst2 {line-height: 15px; background-color: orange;} #tst3 {line-height: 150%; background-color: yellow;} #tst4 {line-height: normal; background-color: orange;} |
Keywords |
|
Applies To | All elements |
Inherited | Yes |
Initial Value | normal |
The line-height properties are set using a number, length, percentage, and a keyword. |