दोनों एलिमेंट्स मिलान के संदर्भ में समान हैं। आइए एक उदाहरण देखें:
<section> <div></div> <!-- div:first-child or div:first-of-type --> <div></div> <!-- div+div or div~div or div:nth-of-type(2) --> <p></p> <div></div> <!-- div+p+div or div~div or div:nth-of-type(3), but not div+div --> </section> <section> <h1></h1> <!-- h1:first-child --> <div></div> <!-- div:first-of-type or div:nth-child(2) --> <div></div> <!-- div~div or div:nth-of-type(2) or div:nth-child(3) --> </section>
यदि आपके पास दोनों सेलेक्टर्स से मेल खाने वाले एलिमेंट्स के साथ CSS नियम हैं, तो आपके div: not(:first-of-type) को :first-of-type प्सूडो-क्लास के कारण प्राथमिकता मिलेगी।