CSS Universal Selector — exercises and bug fixes
5 hands-on exercises and 5 find-the-bug challenges for the CSS Universal Selector lesson. Every one is checked automatically in the browser — write the code, run it, and the tests tell you what still fails.
Exercises(5)
- 1
Reset with the universal selector
easy10 minSet box-sizing on every element.
- 2
Zero every margin
easy10 minRemove margins from all elements.
- 3
Scope the universal selector
easy10 minMake every element inside #one red.
- 4
Set a shared font size
easy10 minGive every element a 20px font size.
- 5
Combine universal with a class
medium10 minTarget every descendant of .card.
Find the bug(5)
- 1
Fix the wrong wildcard character
easy8 minThe universal selector is *, not %.
- 2
Fix the universal used where a class was meant
easy8 minThis resets everything instead of just the cards.
- 3
Fix the missing space
easy8 minWithout a space this targets an element that is both.
- 4
Fix the reset that missed
easy8 minOnly paragraphs got the padding; every element was intended.
- 5
Fix the misspelled property in the reset
easy8 minThe property is box-sizing.
Ready to write the code?
The editor, the automatic checks and the worked solutions open up with an account.
Open the workspace