Challenge - 5 Problems
Responsive Column Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Understanding Bootstrap Responsive Column Classes
In Bootstrap, which class would you use to make a column take up half the width on medium screens and above, but full width on smaller screens?
Attempts:
2 left
💡 Hint
Think about the breakpoint that starts at medium screen size.
✗ Incorrect
The class col-md-6 makes the column take half the width starting at medium screens (≥768px). On smaller screens, it defaults to full width.
📝 Syntax
intermediate2:00remaining
Correct Bootstrap Column Class Syntax
Which of the following is the correct way to specify a column that is 4 units wide on large screens and 12 units wide on extra small screens?
Attempts:
2 left
💡 Hint
Remember that
col- without breakpoint means extra small screens.✗ Incorrect
col-lg-4 sets width to 4 units on large screens and above, col-12 sets full width on extra small screens.
❓ rendering
advanced2:30remaining
Visual Output of Responsive Columns
Given this HTML snippet:
What will the layout look like on a medium screen (≥768px and <992px)?
<div class="row"> <div class="col-sm-6 col-lg-3">Box 1</div> <div class="col-sm-6 col-lg-3">Box 2</div> <div class="col-sm-6 col-lg-3">Box 3</div> <div class="col-sm-6 col-lg-3">Box 4</div> </div>
What will the layout look like on a medium screen (≥768px and <992px)?
Attempts:
2 left
💡 Hint
Check which breakpoint applies at medium screen size.
✗ Incorrect
At medium screens, col-sm-6 applies, so each box is half width. Four boxes create two rows with two boxes each.
❓ selector
advanced2:30remaining
Choosing the Right Responsive Class
You want a column to be full width on extra small and small screens, half width on medium screens, and one-third width on large screens and above. Which class combination achieves this?
Attempts:
2 left
💡 Hint
Remember that
col- applies to extra small screens.✗ Incorrect
col-12 sets full width on extra small, col-md-6 half width on medium, and col-lg-4 one-third width on large screens.
❓ accessibility
expert3:00remaining
Accessibility Considerations with Responsive Columns
When using Bootstrap responsive columns, what is the best practice to ensure screen readers understand the layout order on all screen sizes?
Attempts:
2 left
💡 Hint
Think about how visual order and DOM order affect screen readers.
✗ Incorrect
Using Bootstrap's order classes changes visual order without changing DOM order, preserving logical reading order for screen readers.