Indentation: the 'text-indent' property

Value: | | inherit
Initial: 0
Applies to: block-level elements
Inherited: yes
Percentages: refer to width of containing block
Media: visual

This property specifies the indentation of the first line of text in a block. More precisely, it specifies the indentation of the first box that flows into the block's first line box. The box is indented with respect to the left (or right, for right-to-left layout) edge of the line box. User agents should render this indentation as blank space.

Values have the following meanings:

The indentation is a fixed length.
The indentation is a percentage of the containing block width.

The value of 'text-indent' may be negative, but there may be implementation-specific limits.


The following example causes a '3em' text indent.

  P { text-indent: 3em }