1

I am testing out descendant selector priorities, and so I have this code:

p p {background-color: blue}
p {background-color: purple}

However, it seems that even if I nest <p> inside another <p> it's always purple. When I tried it with span (span span), the descendant selector double span took priority over the single span. In this case, the <p> is never blue. Can someone tell me why?

Temani Afif
  • 245,468
  • 26
  • 309
  • 415
Hello World
  • 191
  • 2
  • 9

0 Answers0