style.textIndent (Property)

Controls the indentation of text within the styled element.


CSS level - 1
DOM level - 2
JavaScript - 1.5
JScript - 3.0
Internet Explorer - 4.0
Netscape - 6.0
Property/method value type:String primitive
JavaScript syntax:-myStyle.textIndent
CSS syntax:text-indent: aValue
Argument list:aValueAn amount of text indentation

Text blocks can have the first line indented. This might be applied to an element that is instantiated by a <P> tag for example.

The value is specified using the normal measurement units such as pixels or floating point fractional em-dash values.

If you want to create a hanging indent effect, the first line can be moved leftwards by specifying a negative value in this property.

Assigning a value of zero to this property restores it to its default condition with all lines being left justified identically.


See also:JSSTag.textIndent, Measurement units