HTML and CSS Reference
In-Depth Information
Name
text-indent
CSS2 Values:
<length> | <percentage>
CSS3 Values:
[ <length> | <percentage> ] && [ hanging || each-line ]?
Initial value:
0
Applies to:
Block-level elements
Inherited:
Yes
Percentages:
Refer to the width of the containing block
Computed value:
For percentage values, as declared; for length values, the absolute length
Description:
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 in-
dent) 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 cre-
ation of an outdent effect without using a negative length value.
Examples:
p {text-indent: 5em;}
h2 {text-indent: −25px;}
Search WWH ::




Custom Search