Text-indent Property
The text-indent property sets the indentation for the first line of text in a block of text.
Possible Values
- a length value:
- em - relative unit - the width of the 'font-size' of the font in use.
- ex - relative unit - the height of the letter 'x' in the current font.
- in - absolute unit - inches.
- mm - absolute unit - millimeters.
- cm - absolute unit - centimeters.
- pt - absolute unit - points - a point is 1/72nd of an inch.
- pc - absolute unit - picas - one pica = 12 pt.
- px - absolute unit - pixel - one pixel = 0.75 pt.
- % - a percentage of the width of the parent element.
- inherit - the value is inherited from the parent element.
Here you can see the text-indent property in use:
{text-indent: 10%}
Will give the following result when applied to a paragraph of text:
As you can see the first line of text has an indent of ten percent of the width of the paragraph element. Subsequent lines of text are not effected by the text-indent property and span the full-width of the parent element - in this case a paragraph.
