Specificity and the cascade
A score that determines which CSS rule wins when multiple rules target the same element; higher score beats lower
What it does: When two rules have identical specificity, the one declared later in the stylesheet wins — here 'color: red' overrides 'color: black'. A class selector scores 0,0,1,0 while an element selector scores 0,0,0,1, so .note beats a plain 'p' rule. ID selectors score 0,1,0,0 while class selectors score 0,0,1,0 — IDs always win over classes. Source order is the tiebreaker — the later rule overrides the earlier one. !important overrides even inline styles, sitting at the very top of the cascade. Class selectors have higher specificity than element (type) selectors. CSS declarations must end with a semicolon. 'color: black' with no semicolon is a common error that can cause subsequent declarations to be ignored.
Common mistakes: The '.box' rule is missing a semicolon after 'green' — it should be 'color: green;'. 'colour' is not a valid CSS property — the correct spelling is 'color'.
Free printable worksheet with full answer key — or add this module to a journey and assign it to your class.
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
specificityFill in the Blanks
Spot the Error
Create a free class, add this module to a journey, and track who's stuck.
Create a free teacher account →No credit card. No setup fee. Make a class and invite students in under three minutes.
Practice this topic interactively, track progress, and unlock badges.
Start Learning Free →