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

Text Align in CSS

The text-align Property

 

 

The text-align property specifies the horizontal alignment of text in an element. By default, its value is set to left. However, we can change it to the right, center, or justify.

 

Syntax:-

 

Its syntax is:-

< style >

element{

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

}

< /style >

 

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 Basic

All Sections related to CSS