← Quiz: CSS Basics: all 10 questions
Quiz: CSS Basics · Question 10 of 10
Two rules have the same specificity and both set color. Which one wins?
Two rules have the same specificity and both set color. Which one wins?
- A.The first one in the file
- B.The one that appears later
- C.Neither; the browser uses black
- D.The shorter rule
Answer & explanation
Correct answer: The one that appears later
When specificity is equal, the later rule in the cascade wins.
Can you get the rest right without peeking?
Take the timed Quiz: CSS Basics quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →