Here is a little piece of code.
<style ...>
h1 { color: red }
h2 { color: olive }
em { color: red }
h1 em { color: blue }
</style ...>
<body>
<H1>This <h2>headline is <EM>very</EM> important</h2> to me.</H1>
</body>
I even tried this code at jsfiddle, but couldn’t understand WHY that last two words to me appear in black color. I thought it would be red.
That’s because you cannot nest h1-h6 tags. The
<h2>tag implicitly closes<h1>so it is interpreted as: