Widely availableSupported across all major browsers. Safe to use in production.

Overview

The text-indent CSS property sets the size of the empty space (indentation) at the beginning of lines in a text.

Browser support

Feature Desktop Mobile
Chrome
Edge
Firefox
Safari
Chrome Android
Safari iOS
1
12
1
1
18
1
1+Supported (version) Not supported Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)

Syntax

CSS
p {
  text-indent: 1em;
}
.hanging {
  text-indent: -2em;
  padding-left: 2em;
}

Live demo

text-indent: 1em

CSS Text-indent: 1em demo.

PreviewFullscreen

bottomindent

CSS bottomindent demo.

PreviewFullscreen

big indent

CSS big indent demo.

PreviewFullscreen

Use cases

  • Using text-indent

    The text-indent CSS property sets the size of the empty space (indentation) at the beginning of lines in a text.

Cautions

  • May not be supported in older browsers.

Accessibility

  • Make sure visual changes are conveyed appropriately to assistive technology.

Powered by web-features