Challenge - 5 Problems
CSS Stylesheet Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📝 Syntax
intermediate2:00remaining
What is the output of this CSS code?
Given the following CSS, what color will the text inside the <p> tag be?
CSS
p {
color: blue;
font-size: 1.5rem;
}Attempts:
2 left
💡 Hint
Look at the color property inside the p selector.
✗ Incorrect
The CSS rule sets the color property of all <p> elements to blue, so the text inside will appear blue.
❓ selector
intermediate2:00remaining
Which selector applies styles to all elements with class 'highlight'?
You want to style all elements that have the class 'highlight'. Which CSS selector should you use?
Attempts:
2 left
💡 Hint
Class selectors start with a dot (.)
✗ Incorrect
In CSS, a dot (.) before a name selects all elements with that class. So '.highlight' targets all elements with class 'highlight'.
❓ layout
advanced2:00remaining
What layout will this CSS produce?
Consider this CSS applied to a container and its children. What layout will the children have?
CSS
.container { display: flex; flex-direction: column; gap: 1rem; }
Attempts:
2 left
💡 Hint
flex-direction: column stacks items vertically.
✗ Incorrect
The container uses flexbox with column direction, so children stack vertically. The gap adds space between them.
❓ accessibility
advanced2:00remaining
Which CSS rule improves text accessibility?
Which CSS rule helps improve readability for users with visual impairments?
Attempts:
2 left
💡 Hint
High contrast between text and background helps readability.
✗ Incorrect
Black text on white background (#000000 on #ffffff) provides strong contrast, making text easier to read for most users.
🧠 Conceptual
expert2:00remaining
What happens if you omit the charset meta tag in your HTML when linking a CSS file?
You link a CSS file in your HTML but forget to include the <meta charset="UTF-8"> tag in the <head>. What is the likely effect?
Attempts:
2 left
💡 Hint
Charset tells the browser how to read characters in files.
✗ Incorrect
Without the charset meta tag, browsers may misinterpret special characters in CSS, causing styles to fail or behave unexpectedly.