Easy Tutorial
❮ Prop Style Bordertopleftradius Jsref Sin ❯

textIndent Property


Definition and Usage

The textIndent property sets or returns the indentation of the first line of text.

Syntax

Set the textIndent property:

Return the textIndent property:

Value Description
length Defines the indentation using units like px, cm, etc. The default value is 0.
% Defines the indentation as a percentage of the parent element's width.
inherit The value of the textIndent property is inherited from the parent element.

Browser Support

All major browsers support the textIndent property.

Note: IE7 and earlier versions do not support the "inherit" value. IE8 only supports "inherit" if !DOCTYPE is specified. IE9 supports "inherit".


Example

Indenting Text:


❮ Prop Style Bordertopleftradius Jsref Sin ❯