Easy Tutorial
❮ Css3 Pr Mediaquery Sel Last Child ❯

CSS text-indent Property

Example

Indent the first line of a paragraph by 50 pixels:

p {
    text-indent: 50px;
}

Property Definition and Usage

The text-indent property specifies the indentation of the first line 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 specify the first browser version that fully supports the property.

Property
text-indent 1.0 3.0 1.0 1.0 3.5

Property Values

Value Description
length Defines a fixed indentation. Default value: 0.
% Defines the indentation as a percentage of the parent element's width.
inherit Specifies that the value of the text-indent property should be inherited from the parent element.

Related Articles

CSS Tutorial: CSS Text

❮ Css3 Pr Mediaquery Sel Last Child ❯