Use `display: flex; justify-content: center; align-items: center;` on the parent
Use `margin: 0 auto;` for horizontal centering of a block element with a set width
Use `position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);`
Use `display: grid; place-items: center;` on the parent
Use `text-align: center;` for inline or inline-block content
Use `margin-inline: auto;` for horizontal centering in modern CSS
Set a fixed or max width on the div when using auto margins
Use `position: relative;` on the parent when centering absolutely positioned children
