How do I center text with line-height?
To vertically center a single line of text or an icon within its container, we can use the line-height property. This property controls the height of a line in a run of text and adds an equal amount of space above and below the line-box of inline elements.
How to align text vertically and horizontally center in CSS?
To center both vertically and horizontally, use padding and text-align: center : I am vertically and horizontally centered.