Indents (leaves empty space) the first line in a text-block.


text-indent: <value>;

The amount of indentiation can be specified by using percentages or length values (px, em, etc):

Example 1

Specifying indentation lenght with percentages.

p {
text-indent: 20%;

Example 2

Specifying indentation lenght with px and em values.

.div1 p {
text-indent: 50px;
.div2 p {
text-indent: 2em;


Interested in helping build Docs? Read the Contribution Guide or share your thoughts in this feedback form.

Learn CSS on Codecademy