The text-indent property sets the indentation for the first line of text in a block of text.
- 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.
Here you can see the text-indent property in use:
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.