This CSS property is used to set the horizontal alignment of a table-cell box or the block element. It is similar to the vertical-align property but in the horizontal direction.
justify: It is generally used in newspapers and magazines. It stretches the element's content in order to display the equal width of every line.
center: It centers the inline text.
right: It is used to align the text to the right.
left: It is used to align the text to the left.
Let's see an example that will demonstrate the text-align property.
ExampleTest it Now