7 of 313 menu

The text-indent property

The text-indent property sets an indentation for a text (that is, the indent of the first line). It can be either positive or negative.

The property value is any size units. When specifying a value in %, the indentation will be a percentage of the block width. Default value: 0.

Syntax

selector { text-indent: value; }

Example

Let's indent the first line of each paragraph by 30px:

<p> some long text </p> <p> some long text </p> p { text-indent: 30px; text-align: justify; }

:

Example

Let's set text-indent to a negative value:

<p> some long text </p> <p> some long text </p> p { text-indent: -10px; text-align: justify; }

:

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline