title: HTML <p> and <span> - elements background color not working
body: <p>I want to create a few span-elements within a p-element. These span-elements should have different background colors than the p-elements.</p>
  
  <p>The code:</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;p style="background-color:blue"&gt; &lt;!-- color not working --&gt;
    &lt;span style="background-color:red"&gt;&lt;H2&gt;boo-title&lt;/H2&gt;  &lt;!-- color not working --&gt;
      &lt;script language="JavaScript"&gt;
        document.write("boo");
      &lt;/script&gt;
    &lt;/span&gt;
    &lt;span style="background-color:green"&gt;&lt;H2&gt;foo-title&lt;/H2&gt; &lt;!-- color working --&gt;
      &lt;script language="JavaScript"&gt;
        document.write("foo");
      &lt;/script&gt;
    &lt;/span&gt;
  &lt;/p&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Why is the background-color sometimes working and sometimes not, although it is defined in the same way? And how do i get this to work, when defining it like this?</p>