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
selector {
text-indent: value;
}
Example
Let's indent the first line of each
paragraph by 30px
:
<p>
some text...
</p>
<p>
some text...
</p>
p {
text-indent: 30px;
text-align: justify;
}
:
Example
Let's set text-indent to a negative value:
<p>
some text...
</p>
<p>
some text...
</p>
p {
text-indent: -10px;
text-align: justify;
}
: