text-indent property specifies the indentation applied to lines of inline content in a block.
When using the
text-indent property, the indent is treated as a margin applied to the start edge of the line box. Only lines that are the first formatted line of an element are affected (unless otherwise specified via the
- This value specifies an absolute length as the amount of the indent.
- This value specifies the amount of the indent as a percentage of the containing block's logical width.
- Indentation affects the first line of the block container as well as each line after a forced line break, but does not affect lines after a soft wrap break.
- Inverts which lines are affected.
In addition, all CSS properties also accept the following CSS-wide keyword values as the sole component of their property value:
- Represents the value specified as the property's initial value.
- Represents the computed value of the property on the element's parent.
- This value acts as either
initial, depending on whether the property is inherited or not. In other words, it sets all properties to their parent value if they are inheritable or to their initial value if not inheritable.
- Initial Value
- Applies To
- Block containers
- Yes (see example)