🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.The first one in the file
  2. B.The one that appears later
  3. C.Neither; the browser uses black
  4. 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 →