text-indent

Sets the amount of empty space that appears before the first line of text in a block. Negative values can be used to create 'hanging' indents.

It is documented as part of the CSS Text specification.

/* Usage Example */
p {
  /* Indents the first line of every paragraph by 20 pixels */
  text-indent: 20px;
}

/* Syntax */
text-indent: hanging;
text-indent: each-line;

/* Global values */
text-indent: inherit;
text-indent: initial;
text-indent: revert;
text-indent: revert-layer;
text-indent: unset;
Widely available Since 2015 96% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2015.

1+
1+
1+
12+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC