Center wit CSS

You can horizontally and vertically center text in <div> tags using the following methods:

Horizontally: text-align: center
Vertically: padding-top and padding-bottom properties, assigning both values

To position the <div> tag itself in the center:

Setting a width and applying the margin property with the value “auto”.