CSS text-indent property

The text-indent property

The CSS text-indent property is used to indent the first line of the specified text. If this is a paragraph, only the first line will be indented by the given px, pt or %  etc.

The positive value given in the text-indent CSS property will indent to the right. If a negative value is given, it will be indented towards the left.

Example of using text-indent property

The following is a CSS indent example. The example indents the multi-line paragraph <p> to specified value in pixels.

Experience this example online


You can see, the paragraph text is indented 50px by using the text-indent property.

Also see CSS line-height | CSS text

Was this article helpful?

Related Articles

Leave A Comment?