CSS text-indent Property Tutorial

In this section, we will learn what the text-indent is and how to use it in CSS.

CSS text-indent property

Click here to run the example of text-indent property.

HTML Indentation: CSS text-indent Property Definition and Usage

The CSS `text-indent` property is used to indent the first line of a text block.

CSS text-indent Property Syntax

text-indent: length|initial|inherit;

CSS text-indent Property Value

The value of this property is a number with any CSS supported units.

Note: negative values are also allowed here. If used, the first line of a text block will be indented towards the left side instead of indenting towards the right side (which is the path for positive values).

Example: indent with CSS

See the Pen indent with CSS by Omid Dehghan (@enjoytutorials1) on CodePen.

Facebook
Twitter
Pinterest
LinkedIn

Top Technologies