O'Reilly logo

Cascading Style Sheets: The Definitive Guide by Eric A. Meyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

text-indent — IE4 Y/Y | IE5 Y/Y | NN4 Y/Y | Op3 Y/-

Synopsis

Used to set the indentation of the first line of an element. This is most often used to create a tab effect for Negative values are permitted, and cause “hanging indents.”

Example

P {text-indent: 5em;}
H2 {text-indent: -25px;}

Values

<length> | <percentage>

Default

0

Inherited

yes

Applies to

block

Percentage values refer to parent element’s width.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required