On hover of child, change background color of parent container (CSS only)
<p>This is a common question. It almost always gets immediately closed as a duplicate of this question: <a href="https://stackoverflow.com/q/1014861/3597276">Is there a CSS parent selector?</a></p>

<p>The duplicate does a good job pointing out that parent elements cannot be targeted with CSS. But it provides little to no guidance for the original question, which may be caught in the <a href="https://meta.stackexchange.com/q/66377">XY problem</a>.</p>

<p>In this particular case...</p>

<blockquote>
  <p>How can the background color of the parent be changed when hovering the child?</p>
</blockquote>

<p>...there is at least one CSS solution that may solve the problem.</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div&gt;
  &lt;a href="#"&gt;Anchor Text&lt;/a&gt;
&lt;/div&gt;</code></pre>
</div>
</div>
</p>