The text-align property in CSS is used to specify the horizontal alignment of text in an element.
Property Value: The text-align property value are listed below:
- left: It is used to set the text-alignment into left.
- right: It is used to set the text-alignment into right.
- center: It is used to set the text-alignment into center.
- justify: It is used to stretched the content of an element to display the same width of each line.
- initial: It is used to set its default value.
- inherit: It is inherited from its parent.
Supported Browsers: The browser supported by text-align property are listed below:
- Google Chrome 1.0
- Internet Explorer 3.0
- Firefox 1.0
- Opera 3.5
- Safari 1.0
- HTML | canvas textAlign Property
- HTML | DOM Style textAlign Property
- p5.js | textAlign() Function
- CSS | transition-property Property
- CSS | nav-up property
- CSS | nav-down property
- CSS | top Property
- CSS | nav-right property
- CSS | right Property
- CSS | all Property
- CSS | zoom Property
- CSS | filter Property
- CSS | max-width Property
- CSS | border-top Property
- CSS | hyphens Property
- CSS | resize Property
- CSS | align-self Property
- HTML | DOM Map name Property
- CSS | will-change property
- CSS | height Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.