Challenge - 5 Problems
CSS Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
What is the main purpose of CSS?
CSS is used to control the appearance of web pages. What does CSS mainly do?
Attempts:
2 left
💡 Hint
Think about how websites change colors, fonts, and layout.
✗ Incorrect
CSS stands for Cascading Style Sheets. It controls how HTML elements look on the page, such as colors, fonts, spacing, and layout.
📝 Syntax
intermediate1:30remaining
Which CSS rule correctly changes text color to blue?
Look at these CSS rules. Which one will make the text color blue?
CSS
p {
color: blue;
}Attempts:
2 left
💡 Hint
The property to change text color is just 'color'.
✗ Incorrect
The correct CSS property to change text color is color. Other options use invalid property names or syntax.
❓ rendering
advanced2:00remaining
What will be the background color of the box?
Given this CSS, what color will the box's background be?
CSS
div.box { background-color: #ff0000; background-color: rgb(0, 255, 0); }
Attempts:
2 left
💡 Hint
Later rules override earlier ones if they target the same property.
✗ Incorrect
The second background-color rule uses rgb(0, 255, 0) which is green. It overrides the first red color.
❓ selector
advanced2:00remaining
Which CSS selector targets only paragraphs inside a section?
You want to style only
<p> tags that are inside a <section>. Which selector is correct?Attempts:
2 left
💡 Hint
Think about how selectors read from left to right for descendants.
✗ Incorrect
section p selects all p elements inside any section, at any depth. Option A selects only direct children.
❓ accessibility
expert2:30remaining
Which CSS practice improves accessibility for colorblind users?
You want to make sure your website is easy to read for colorblind users. Which CSS practice helps the most?
Attempts:
2 left
💡 Hint
Think about how people who cannot see colors well can still understand content.
✗ Incorrect
High contrast colors improve readability. Adding text labels or icons ensures information is not lost if color is not perceived.