Fandom

HTML & CSS Wiki

Text-indent

649pages on
this wiki
Add New Page
Comments0 Share

The text-indent property is used in CSS and certain HTML elements. It specifies how much horizontal space should be left before beginning of the first line of the text content of an element. Horizontal spacing is with respect to the left (or right, for right-to-left layout) edge of the containing block element's box.


Values

  • <length> - Indentation is specified as fixed <length>. Negative values are allowed. Ex. pt, px, em, etc.
  • <percentage> - Indentation is a <percentage> of the containing block width.


HTML example:

<p style="text-indent:10px;">
Paragraph content.
</p>


CSS example:

p {
   text-indent:10px;
}

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.