Set the line height in percent:
p.small {
line-height: 90%;
}p.big {
line-height: 200%;
}
More “Try it Yourself” examples below.
Definition and Usage
The line-height property specifies the line height.
Note: Negative values are not allowed.
| Default value: | normal |
|---|---|
| Inherited: | yes |
| Animatable: | yes. Read about animatable – Try it |
| Version: | CSS1 |
| JavaScript syntax: | object.style.lineHeight=”30px” Try it |
CSS Syntax
line-height: normal|number|length|initial|inherit;
Property Values
| Value | Description |
|---|---|
| normal | A normal line height. This is default |
| number | A number that will be multiplied with the current font size to set the line height |
| length | A fixed line height in px, pt, cm, etc. |
| % | A line height in percent 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 |
