And a caution: Centering isn’t for everything, and some kinds of centering are different from others. For example, you may want the CSS property text-align: center for a heading, but please don’t use it for body paragraphs on your site! But you may want equally sized margins on both sides of a left-aligned paragraph. Read the article and it will give you ideas on how to manage different kinds of alignment for your page layouts.
For those working on websites just now, puzzling out how to center and align things, here’s a helpful article: https://medium.freecodecamp.org/how-to-center-things-with-style-in-css-dc87b7542689
And a caution: Centering isn’t for everything, and some kinds of centering are different from others. For example, you may want the CSS property
text-align: center
for a heading, but please don’t use it for body paragraphs on your site! But you may want equally sized margins on both sides of a left-aligned paragraph. Read the article and it will give you ideas on how to manage different kinds of alignment for your page layouts.