Challenge - 5 Problems
Background Design Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
How do backgrounds improve readability?
Which of the following best explains why using a subtle background color can improve text readability on a webpage?
Attempts:
2 left
💡 Hint
Think about how color contrast affects your ability to read text.
✗ Incorrect
Background colors help by creating contrast with text color. This contrast makes the text stand out and easier to read, especially for users with vision difficulties.
📝 Syntax
intermediate2:00remaining
Tailwind background color syntax
Which Tailwind CSS class correctly sets a light gray background color?
Attempts:
2 left
💡 Hint
Tailwind uses the format bg-color-shade for backgrounds.
✗ Incorrect
Tailwind background colors use the bg- prefix followed by the color name and shade number, like bg-gray-200.
❓ rendering
advanced2:00remaining
Visual effect of background opacity
What visual effect will the following Tailwind class produce on a background?
bg-blue-500 bg-opacity-50
Attempts:
2 left
💡 Hint
Opacity controls how see-through the background color is.
✗ Incorrect
The bg-opacity-50 class sets the background color to 50% transparent, so you can see behind the blue background partially.
❓ selector
advanced2:00remaining
Selecting background with Tailwind for dark mode
Which Tailwind class combination correctly applies a white background in light mode and a dark gray background in dark mode?
Attempts:
2 left
💡 Hint
Tailwind uses the
dark: prefix for dark mode styles.✗ Incorrect
Using bg-white dark:bg-gray-800 sets the background to white normally and switches to dark gray when dark mode is active.
❓ accessibility
expert3:00remaining
Ensuring accessible background contrast
You want to ensure your webpage background and text meet accessibility contrast standards. Which approach is best?
Attempts:
2 left
💡 Hint
Accessibility guidelines specify minimum contrast ratios for readability.
✗ Incorrect
WCAG guidelines require a contrast ratio of at least 4.5:1 for normal text to ensure readability for users with vision impairments.