0
0
Bootsrapmarkup~20 mins

Responsive column classes in Bootsrap - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Responsive Column Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2: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?
Acol-6
Bcol-md-6
Ccol-sm-6
Dcol-lg-6
Attempts:
2 left
💡 Hint
Think about the breakpoint that starts at medium screen size.
📝 Syntax
intermediate
2: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?
Acol-4 col-lg-12
Bcol-12 col-lg-4
Ccol-lg-4 col-xs-12
Dcol-lg-4 col-12
Attempts:
2 left
💡 Hint
Remember that col- without breakpoint means extra small screens.
rendering
advanced
2:30remaining
Visual Output of Responsive Columns
Given this HTML snippet:
<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)?
ATwo rows with two boxes each, each box half width
BOne row with four boxes, each quarter width
CFour rows with one box each, full width
DOne row with two boxes, each half width
Attempts:
2 left
💡 Hint
Check which breakpoint applies at medium screen size.
selector
advanced
2: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?
Acol-12 col-md-6 col-lg-4
Bcol-6 col-md-12 col-lg-4
Ccol-sm-12 col-md-6 col-lg-3
Dcol-12 col-sm-6 col-lg-4
Attempts:
2 left
💡 Hint
Remember that col- applies to extra small screens.
accessibility
expert
3: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?
AUse JavaScript to rearrange DOM elements based on screen size
BUse <code>aria-label</code> on each column to describe its content
CUse Bootstrap's order classes to control visual order and keep DOM order logical
DAdd tabindex="-1" to all columns to skip them in tab order
Attempts:
2 left
💡 Hint
Think about how visual order and DOM order affect screen readers.