0
0
CSSmarkup~20 mins

What is responsive design in CSS - Practice Questions & Exercises

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Responsive Design Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
What does responsive design primarily aim to achieve?
Choose the best description of what responsive design does in web development.
AIt changes the website's color scheme based on user preferences.
BIt makes a website adjust its layout and content to look good on different screen sizes.
CIt improves website speed by compressing images automatically.
DIt adds animations to a website to make it more interactive.
Attempts:
2 left
💡 Hint
Think about how websites look on phones versus big monitors.
📝 Syntax
intermediate
2:00remaining
Which CSS snippet correctly applies a responsive style for screens smaller than 600px?
Select the CSS code that changes the background color to lightblue only on screens narrower than 600px.
Abody { background-color: lightblue; max-width: 600px; }
B@media screen and (min-width: 600px) { body { background-color: lightblue; } }
C@media (max-width: 600px) { body { background-color: lightblue; } }
D@media (width: 600px) { body { background-color: lightblue; } }
Attempts:
2 left
💡 Hint
Look for the media query that targets screens up to 600px wide.
layout
advanced
2:00remaining
What will be the layout behavior of this CSS on different screen sizes?
Given the CSS below, what happens to the container's layout when the screen width is less than 500px?
CSS
.container {
  display: flex;
  flex-direction: row;
}
@media (max-width: 500px) {
  .container {
    flex-direction: column;
  }
}
AThe container items become hidden overflow on small screens.
BThe container items stay in a row on all screen sizes.
CThe container items disappear on screens smaller than 500px.
DThe container items stack vertically on screens smaller than 500px.
Attempts:
2 left
💡 Hint
Think about what changing flex-direction from row to column does.
accessibility
advanced
2:00remaining
How does responsive design improve accessibility?
Choose the best explanation of how responsive design helps users with different needs.
AIt ensures content is readable and usable on all devices, including screen readers and zoomed views.
BIt automatically translates content into multiple languages.
CIt disables animations to reduce distractions for all users.
DIt forces all users to see the same fixed layout regardless of device.
Attempts:
2 left
💡 Hint
Think about how flexible layouts help users who zoom or use assistive devices.
selector
expert
2:00remaining
Which CSS selector targets only images inside a responsive grid container?
Given a grid container with class grid-container, which selector applies styles only to images inside it?
A.grid-container img
B.grid-container > img
Cimg.grid-container
Dgrid-container img
Attempts:
2 left
💡 Hint
Think about descendant selectors versus direct child selectors.