<?xml version="1.0" encoding="utf-8"?>

CSS text-align property

CSS text-align property Bad Practice
CSS text-align property Best Practice

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.

Improve your UX & Product skills with interactive courses that actually work