Challenge - 5 Problems
Universal Selector Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ selector
intermediate1:00remaining
What does the universal selector (*) do in CSS?
Choose the correct description of the universal selector
* in CSS.Attempts:
2 left
💡 Hint
Think about what
* means in everyday life, like a wildcard.✗ Incorrect
The universal selector
* matches every element in the document, regardless of type, class, or ID.❓ rendering
intermediate1:30remaining
What color will all elements have with this CSS?
Given this CSS code:
What color will the text of all elements be?
* { color: red; }What color will the text of all elements be?
Attempts:
2 left
💡 Hint
The universal selector applies styles to every element.
✗ Incorrect
The universal selector
* applies the color red to all elements, so all text will appear red.🧠 Conceptual
advanced2:00remaining
Which CSS rule will NOT be overridden by the universal selector?
Consider these CSS rules:
What color will paragraphs have?
p { color: blue; }
* { color: red; }What color will paragraphs have?
Attempts:
2 left
💡 Hint
Think about CSS specificity and which rule wins.
✗ Incorrect
The paragraph selector
p is more specific than the universal selector *, so paragraphs will be blue.❓ accessibility
advanced2:00remaining
Why should you be careful using the universal selector (*) for styling?
Which is a potential accessibility problem when using
* to style all elements?Attempts:
2 left
💡 Hint
Think about how styling focus outlines affects users who use keyboards.
✗ Incorrect
Using
* to remove or change focus outlines can make it hard for keyboard users to see where they are on the page, hurting accessibility.❓ layout
expert2:30remaining
What is the effect of this CSS on layout?
Given this CSS:
What does this do to the page layout?
* { margin: 0; padding: 0; box-sizing: border-box; }What does this do to the page layout?
Attempts:
2 left
💡 Hint
Think about what margin, padding, and box-sizing control.
✗ Incorrect
This resets all elements' margin and padding to zero and sets box-sizing to border-box, which includes padding and border in element size, making layout sizing predictable.