Challenge - 5 Problems
Responsive Design Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Why do we use responsive design in web development?
Which of the following best explains why responsive design is essential for modern websites?
Attempts:
2 left
💡 Hint
Think about how people use phones, tablets, and computers differently.
✗ Incorrect
Responsive design means the website changes its layout to fit the screen size. This helps users have a good experience whether they use a phone, tablet, or desktop.
📝 Syntax
intermediate2:00remaining
Tailwind CSS: Which class makes text responsive?
In Tailwind CSS, which class will make text size adjust for small screens?
Attempts:
2 left
💡 Hint
Look for a class that sets a smaller size first, then larger on bigger screens.
✗ Incorrect
In Tailwind, text-sm md:text-lg means text is small on default and becomes large on medium screens and up.
❓ layout
advanced2:00remaining
How does Tailwind's grid system help responsive design?
Given this Tailwind grid container:
grid grid-cols-1 md:grid-cols-3 gap-4, what happens on medium screens and larger?Attempts:
2 left
💡 Hint
Check how the prefix
md: changes the grid columns.✗ Incorrect
grid-cols-1 sets 1 column by default. md:grid-cols-3 changes it to 3 columns on medium screens and up.
❓ accessibility
advanced2:00remaining
Why is accessibility important in responsive design?
Which statement best describes the role of accessibility in responsive web design?
Attempts:
2 left
💡 Hint
Think about users who might use screen readers or keyboard navigation.
✗ Incorrect
Accessibility means designing websites so everyone can use them easily, no matter their device or ability.
❓ rendering
expert2:00remaining
What is the visual result of this Tailwind code on a small screen?
Consider this HTML snippet:
What color background will the inner box have on a screen smaller than 640px wide?
<div class="container mx-auto p-4"> <div class="bg-blue-500 text-white p-6 rounded-lg sm:bg-red-500">Hello World</div> </div>
What color background will the inner box have on a screen smaller than 640px wide?
Attempts:
2 left
💡 Hint
The
sm: prefix applies styles only on small screens and up (≥640px).✗ Incorrect
The class bg-blue-500 applies by default. The sm:bg-red-500 applies only on screens 640px and wider. On smaller screens, the background stays blue.