As a beginner in html and css, I am trying to figure out how to give a line of text a background color. Here is an example of what I have:
#python-heading {
font-family: 'Arvo', serif;
position: absolute;
bottom: 600px;
left: 600px;
background-color: #DEE0D9;
}
<body>
<header>
<span><h1 id="python-heading">Python</h1></span>
<h2 id="python-subheading">Subtitle</h2>
</header>
</body>
However, I am facing an issue where the background color is only behind the text itself, rather than spanning the whole area. I want it to look like this:
hyphen => bg color
-------------------------------------------text--------------------------------------------------------
But currently, it appears like this:
-text-
What changes or additions do I need to make to achieve the desired effect?