CSS text-indent Property

CSS text-indent property specifies the amount of indentation before the first line of an text element.


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

Default value: 0
Applies to: All block level elements, table cells, and inline-blocks
Inherited: Yes
Version: CSS1
JavaScript Syntax: object.style.textAlign = "center"


Here is a syntax for the CSS text-indent property

text-indent: length | percentage | initial | inherit;

Property Values

The following table describes the values of this property.

Value Description
length Specifies indentation in length value expressed in px, pt, cm, em, etc
Negative values are also allowed
right Specifies indentation in percentage value
Negative values are also allowed
initial Sets default value of this property
inherit Inherits this property from its parent element


The example below shows to sets text-indent property.

p.one {
  text-indent: 35px;
p.two {
  text-indent: 10%;

Run it...   »

Browser Compatibility

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

Note: Here details of browser compatibility with version number may be this is bug and not supported. But recommended to always use latest Web browser.