CSS PROPERTIES
Expand All | Collapse All
CSS AT-RULES
Advertisements

CSS text-indent Property

Topic: CSS3 Properties ReferencePrev|Next

Description

The text-indent CSS property specifies the indent in the first line of text within an element.

The following table summarizes the usages context and the version history of this property.

Default value: 0
Applies to: Block and inline-block elements, table cells
Inherited: Yes
Animatable: Yes. See animatable properties.
Version: CSS 1, 2, 3

Syntax

The syntax of the property is given with:

text-indent length | percentage | initial | inherit

The example below shows the text-indent property in action.

p {
    text-indent: 100px;
}

Property Values

The following table describes the values of this property.

Value Description
length Specifies a fixed length indentation. Negative length Values are allowed.
percentage The indentation is a percentage (%) of the containing block width. Negative percentage Values are allowed.
initial Sets this property to its default value.
inherit If specified, the associated element takes the computed value of its parent element text-indent property.

Browser Compatibility

The text-indent property is supported in all major modern browsers.

Browsers Icon

Basic Support—

  • Firefox 1+
  • Google Chrome 1+
  • Internet Explorer 3+
  • Apple Safari 1+
  • Opera 3.5+

Further Reading

See tutorial on: CSS Text, CSS Margin.

Text-related properties: letter-spacing, text-align, text-decoration, text-overflow, text-shadow, text-transform, white-space, word-spacing.

Advertisements
Bootstrap UI Design Templates Property Marvels - A Leading Real Estate Portal for Premium Properties