I am digging into the difference between child and descendant selector. Accordingly to the documentation that I found and to this question CSS Child vs Descendant selectors I write this example:
<div>
<h2>h2 1</h2>
<h2>h2 2</h2>
<section>
section
<h1>h1 section's son
<h2>h2 section's nephew</h2>
</h1>
<h2>h2 section's son</h2>
</section>
<h2>h2 3</h2>
<h2>h2 4</h2>
</div>
css:
section > h2 {
color:red;
}
(fiddle here:http://jsfiddle.net/armdan/ksB6f/1/)
I expected that in this example the "h2 section's nephew" will not be selected, but it is selected and it becomes red. I don't understand what I am missing.