The text-indent property

The text-indent property sets an indentation for a text (that is, the indent of the first line). It can be either positive or negative.

The property value is any size units. When specifying a value in %, the indentation will be a percentage of the block width. Default value: 0.

Syntax

cssselector {
  text-indent: value;
}

Example

Let's indent the first line of each paragraph by 30px:

html<p>
  some long text
</p>
<p>
  some long text
</p>
cssp {
  text-indent: 30px;
  text-align: justify;
}

Результат:

Example

Let's set text-indent to a negative value:

html<p>
  some long text
</p>
<p>
  some long text
</p>
cssp {
  text-indent: -10px;
  text-align: justify;
}

Результат: