CSS

CSS Intro

CSS Intro Quiz

CSS Intro Exercise

CSS Basic

CSS Basic Quiz

CSS Basic Exercise

CSS Advance

CSS Advance Quiz

CSS Advance Exercise

CSS3

CSS3 Quiz

CSS3 Exercise

CSS Properties

CSS Functions

CSS Selectors

CSS text align Property

CSS text-align Property

 

 

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

 

Default Value:-

 

Its default value is right if the direction is rtl, and left if the direction is ltr.

 

Syntax:-

 

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

 

Further Explanation:-

 

Value Description
left Aligns the text to the left
right Aligns the text to the right
center Centers the text
justify Stretches the lines so that each line has equal width.
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

Code Explanation

All Tutorials related to CSS Properties

All Sections related to CSS