1

<article>
  <div>
    Video
  </div>
  <div>
    Image
  </div>
  <div class="couldBeOtherWrappersLikeOL">
    <p class="howDoISelectThisPOnly">
      First paragraph
    </p>
  </div>
  <ol>
    <li>first point</li>
    <p>
      description of first point
    </p>
    <li>second point</li>
    <p>
      description of second point
    </p>
  </ol>
</article>

I want to make sure the first P in the article to be selected. Using

article p:first-of-type

is no good because this will also select the first P in the OL block. So how do I select the first occurrence of P in ARTICLE?

David Thomas
  • 249,100
  • 51
  • 377
  • 410
shenkwen
  • 3,536
  • 5
  • 45
  • 85

0 Answers0