TalentJR apps
Sometimes two rules try to give the same element different colours. CSS decides with two simple ideas. First, the stronger selector wins: an id selector beats a class selector, and a class selector beats an element selector. Second, if the selectors are equally strong, the rule that comes later wins. This is the cascade in Cascading Style Sheets.
✓ You passed this lesson’s test.
Stronger first, then later — “the stronger selector wins; if equal, the later rule wins”
Use it for: Fixing “my colour does not change” problems and writing tidy style sheets.
Check: id beats class and element — orange ✓
▶ Watch it animatedWork it out in your head or on paper, type the answer and press Check. Stuck? Press “Show me how”.
Right: 0 · Tried: 0
20 questions. Check each answer, then go to the next one. Get 16 or more right to pass.
🏅 Sign in with Google to earn the ⚖️ Cascade Judge badge when you pass — and a certificate when you finish all 10 lessons of Part 2 · CSS. You can still take the test without signing in.
Why does it work? When should you use it? Ask in English, मराठी or हिंदी.
Sign in with Google to ask Free — 20 questions a day.
Prefer a real teacher? TalentJR teachers take live online classes anywhere in India and visit homes in selected cities. Tell us what you need and our team will call you with timings and fees.