CSS text-indentProperty
Example
Indent the first line of the paragraph by 50 pixels:
p
{
text-indent:50px;
}
{
text-indent:50px;
}
Try it Yourself »
Property definition and usage instructions
The text-indent property specifies the indentation of the first line of text in a text block.
Note:Negative values are allowed. If the value is negative, the first line will be indented to the left.
| Default value: | 0 |
|---|---|
| Inherited: | yes |
| version: | CSS1 |
| JavaScript Syntax: | object.style.textIndent="50px" |
Browser Support
The numbers in the table indicate the first browser version number that supports the property.
| Property | |||||
|---|---|---|---|---|---|
| text-indent | 1.0 | 3.0 | 1.0 | 1.0 | 3.5 |
Property value
| Value | Description |
|---|---|
| length | Defines a fixed indent. Default value: 0. |
| % | Defines the indentation as a percentage based on 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
other extensions