Name

text-indent

Values:

<length> | <percentage> | inherit

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 specified; for length values, the absolute length.

Description:

This property is used to define 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.

Examples:

p {text-indent: 5em;}
h2 {text-indent: −25px;}

Supported by:

Firefox, Internet Explorer, Opera, Safari.

Get CSS Pocket Reference, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.