English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
CSS line-height line spacing propertyUsed forThe minimum height of the line box defined within the element. It sets the spacing between two lines of content.
It defines the space amount above and below an inline element. It allows you to set the line height independently of the font size.
line-The height property value is related to CSS line-The height property must be used together.
Value | Description |
---|---|
normal | This is the default value. It specifies the normal height. |
number | It specifies a number that is multiplied by the current font size to set the line height. |
length | It is used to set the line height with px, pt, cm, etc. |
% | It specifies the line height as a percentage of the current font. |
initial | It sets this property to its default value. |
inherit | It inherits this property from its parent element. |
<!DOCTYPE html> <html> <head> <style> h3.small { line-height: 70%; } h3.big { line-height: 200%; } </style> </head> <body> <h3> This is a title with the default standard line spacing.<br> This is a title with the default standard line spacing.<br> The default line spacing in most browsers is approximately110%to120%.<br> </h3> <h3 class="small"> This is a title with a small line spacing.<br> This is a title with a small line spacing.<br> This is a title with a small line spacing.<br> This is a title with a small line spacing.<br> </h3> <h3 class="big"> This is a title with a large line spacing.<br> This is a title with a large line spacing.<br> This is a title with a large line spacing.<br> This is a title with a large line spacing.<br> </h3> </body> </html>Test See‹/›