2 min to read
text-align is a CSS property used to align text within an element.
It can take the following values:
Example
HTML
<h1>Hello</h1>
CSS
h1 { text-align: center; }
Result: