Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
| text-indent |
[ <length> | <percentage> ] && [ hanging || each-line ]?
0
Block-level elements
Yes
Refer to the width of the containing block
For percentage values, as declared; for length values, the absolute length
Defines the indentation of the first line of content in a block-level element. It is most often used to create a tab effect. Negative values are permitted and cause outdent (or hanging indent) effects. In CSS3, the value each-line will apply the indentation to any new line that results from a forced line break (e.g., due to a <br> element) within the element, not just the first line. The value hanging inverts the defined pattern of indentation, allowing for the creation of an outdent effect without using a negative length value.
p {text-indent: 5em;}
h2 {text-indent: −25px;}