Challenge - 5 Problems
Color Contrast Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediateWhy is color contrast important in web design?
Which of the following best explains why color contrast matters for accessibility?
Attempts:
2 left
💡 Hint
Think about users who have trouble seeing colors clearly.
✗ Incorrect
Good color contrast ensures that text and important elements are easy to see for everyone, especially people with vision difficulties.
❓ selector
intermediateWhich Bootstrap utility class improves text contrast?
Bootstrap offers utility classes to improve text visibility. Which class increases text contrast on a dark background?
Attempts:
2 left
💡 Hint
Look for a class that makes text lighter on dark backgrounds.
✗ Incorrect
The text-light class makes text light colored, improving contrast on dark backgrounds.
❓ rendering
advancedWhat is the visible result of this Bootstrap code snippet?
Given the following HTML snippet using Bootstrap classes, what will the text color look like on the page?
Bootsrap
<div class="bg-dark p-3"> <p class="text-muted">Sample text</p> </div>
Attempts:
2 left
💡 Hint
The
text-muted class reduces text brightness.✗ Incorrect
The text-muted class makes text a lighter gray, which on a dark background can reduce readability.
📝 Syntax
advancedWhich CSS snippet correctly sets high contrast text on a dark background?
Choose the CSS code that ensures white text on a dark background with good contrast.
Attempts:
2 left
💡 Hint
White text on black background is high contrast.
✗ Incorrect
Setting background to black (#000) and text color to white (#fff) creates strong contrast for readability.
❓ accessibility
expertWhich ARIA attribute helps improve accessibility related to color contrast?
To assist users who rely on screen readers and may have difficulty with color contrast, which ARIA attribute can provide additional context?
Attempts:
2 left
💡 Hint
This attribute gives a text description for screen readers.
✗ Incorrect
aria-label provides a descriptive label for elements, helping users understand content beyond color cues.
