freeCodeCamp/guide/english/css/text-indent/index.md

789 B

title
Text Indent

Text Indent

This CSS property creates an indentation of the first line in a text block.

Values:

The text-indent property can be specified using %, px, em or measurement units such as cm and in.

For example:

  • text-indent: 20%;
  • text-indent: 15px;
  • text-indent: 5em;
  • text-indent: 2in;
  • 'text-indent: 35cm;'

The text-indent property can also inherit from its parent element using inherit value.

For example:

  • text-indent: inherit;

The 'text-indent' property can be reset to it's initial CSS property default value.

For example:

  • 'text-indent: initial;'

More Information: