CSS text-align property
There are several CSS properties that allow you to position text the way you want. The text-align
property defines the horizontal alignment of a text. The values it can take are left
, right
, center
, or justify
. Using justify
will stretch each line to have equal width, like in magazines and newspapers.
To set the vertical alignment of an element, use the vertical-align
property. The values it can take are top
, middle
, and bottom
, which are pretty self-explanatory.