text-indent
The text-indent
leaves empty space on the first line in a text-block.
Syntax
text-indent: <value>;
The amount of indentation can be specified by using percentages or length values (px
, em
, etc.).
Example 1
Specifying indentation length with percentages:
p {text-indent: 20%;}
Example 2
Specifying indentation length with px
and em
values:
.div1 p {text-indent: 50px;}.div2 p {text-indent: 2em;}
All contributors
- garanews222 total contributions
- christian.dinh2481 total contributions
- Anonymous contributorAnonymous contributor3077 total contributions
- asiqurr43 total contributions
- garanews
- christian.dinh
- Anonymous contributor
- asiqurr
Looking to contribute?
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.