I am attempting to have a background color strictly surround the text of the heading without extending across the entire width of the page. I recognize that block level elements automatically occupy the full width of the page, so I am exploring alternative methods to achieve this without resorting to inline styles.
UPDATE: Even after applying display: inline-block;, the headers remain left-aligned despite specifying text-align: center;
. Would using a float be a more effective solution?