CSS textalign Property (original) (raw)

CSS text-align Property

Last Updated : 21 May, 2026

The text-align property in CSS is used to control the horizontal alignment of text inside an element.

**Syntax:

text-align: left|right|center|justify|initial|inherit;

**Default Value: left if the direction is ltr, and right if the direction is rtl

**Property Value

Please refer to the CSS Align article for further details.

**Example: This example illustrates the use of the text-align property, to align it to specified values.

HTML `

text-align property