Most of my pages have H2's and obviously an H1.
The H2's can be inside divs/articles/sections etc - in other words there is no guaranteed structure.
Here's a typical scenario:
<h1></h1>
<section>
<h2>I want this one</h2>
<p></p>
</section>
<section>
<h2>But not this one</h2>
<p></p>
</section>
I want a selector that always guarantees the first occurance on the page - in this case the first H2 wherever it maybe.
I've taken a look and tried the first-of-type selector but found that it applies to its own container, so every H2 is selected here because it is the first within its parent section tag.
Surely in 2015, we are able to do this.
` exist inside ``. Would that work for you?
– Tasos K. Apr 29 '15 at 08:38