Specificity and the Cascade
When rules clash, the more specific selector wins: an id beats a class, and a class beats an element. If equal, the later rule wins.
Examplehtml
Quick check
Which selector wins for an element that matches all three?
Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.
Tip: use the left and right arrow keys to move between lessons.