This means as long as your content is wrapped in or a similar element, it can be centered using text-align. As a property, it can be applied to any element that is considered a block. One of the things that might not seem obvious at first is that text-align: center works for more than just paragraphs. With that said, let's start with the most sought-after approach of them all. These are also going to be the terms we use throughout this guide. And in some cases, you may also see it being referred to as Top & Bottom.
You can also interpret it as Left, Right, and Left & Right. In CSS, centering is often referred to as Vertical, Horizontal, or Vertical & Horizontal.
Centering inline elements with a fixed width.
Centering block elements with a fixed width.