I want to style an H3 header with a background colour. If I do this:
h3 {
background-color: #000;
color: #fff;
}
and
<h3>header tag</h3>
for example, the output in the browser will be displayed across the entire width of it's parent container. If I wrap "header tag" in a <span> tag instead of a div, that the background colour would 'span' the text only.
Is there a way to style an H3 tag so the background colour will 'span' the text of H3 only?
I want to know if this is possible so I can continue to write H3 tags instead of say <span class=h3></span>