CSS text-indent property
Description of property definition and use
The text-indent property specifies the indentation of the first line of text in a block of text.
Note: Negative values are allowed. If the value is negative, indent the first row to the left.
Default: | 0 |
---|---|
Inherited: | yes |
Version: | CSS1 |
JavaScript syntax: | object .style.textIndent="50px" |
Browser support
The numbers in the table support the first browser version number of the property.
Attributes | |||||
---|---|---|---|---|---|
text-indent | 1.0 | 3.0 | 1.0 | 1.0 | 3.5 |
The property value
Value | Describe |
---|---|
length | Define a fixed indentation. Default: 0. |
% | Defines an indentation based on a percentage of the width of the parent element. |
inherit | Specifies that the value of the text-indent property should be inherited from the parent element. |
Related articles
CSS tutorial: CSS text