Responsive column classes in Bootstrap are special class names that let you control how many columns an element takes up on different screen sizes, making your layout adjust smoothly on phones, tablets, and desktops.
Click to reveal answer
beginner
What does the class col-md-6 mean in Bootstrap?
The class col-md-6 means the element will take up 6 out of 12 columns (half the width) on medium-sized screens and larger. On smaller screens, it will stack full width by default.
Click to reveal answer
intermediate
Name the Bootstrap breakpoint prefixes for responsive columns from smallest to largest.
The prefixes are: col- (extra small), col-sm- (small), col-md- (medium), col-lg- (large), col-xl- (extra large), and col-xxl- (extra extra large).
Click to reveal answer
intermediate
How does Bootstrap handle column widths if you only use col without a number?
Using col without a number makes the column automatically share equal width with other col siblings in the same row, adjusting fluidly to the container size.
Click to reveal answer
beginner
Why is it important to use responsive column classes in web design?
Responsive column classes help your website look good and work well on all devices by adjusting the layout automatically, improving user experience and accessibility.
Click to reveal answer
What does col-sm-4 do in Bootstrap?
AMakes the column full width on all screens
BMakes the column 4 units wide on extra small screens only
CMakes the column 4 units wide on small screens and larger
DHides the column on small screens
✗ Incorrect
col-sm-4 sets the column width to 4 out of 12 on small screens (≥576px) and larger.
Which class makes a column take full width on extra small screens but half width on medium screens?
Acol-12 col-md-6
Bcol-md-12 col-6
Ccol-sm-6 col-lg-12
Dcol-6 col-sm-12
✗ Incorrect
col-12 makes full width on extra small, col-md-6 makes half width on medium and up.
If you want three equal columns on large screens but stacked on smaller, which classes would you use?
Acol-md-4
Bcol-lg-4
Ccol-sm-4
Dcol-4
✗ Incorrect
col-lg-4 sets 3 equal columns on large screens (≥992px), stacking on smaller.
What is the total number of columns in Bootstrap's grid system?
A12
B6
C24
D10
✗ Incorrect
Bootstrap grid is based on 12 columns for easy division.
Which class would you use to make a column automatically share equal width with siblings?
Acol-auto
Bcol-6
Ccol-12
Dcol
✗ Incorrect
col without a number shares equal width with other col siblings.
Explain how Bootstrap's responsive column classes help create layouts that work on different screen sizes.
Think about how columns change from full width on phones to side-by-side on desktops.
You got /4 concepts.
Describe the difference between col-, col-sm-, and col-md- classes in Bootstrap.
Remember the smallest to medium screen sizes and how columns behave.
You got /3 concepts.
Practice
(1/5)
1. What does the Bootstrap class col-md-6 do in a responsive layout?
easy
A. Makes the column take half the width on medium and larger screens
B. Makes the column take full width on all screen sizes
C. Makes the column hidden on medium screens
D. Makes the column take one-sixth width on medium screens
Solution
Step 1: Understand the class format
The class col-md-6 means the column uses 6 parts out of 12 on medium (≥768px) screens and larger.
Step 2: Interpret the width fraction
Since Bootstrap grid is divided into 12 parts, 6 parts equal half the width.
Final Answer:
Makes the column take half the width on medium and larger screens -> Option A
Quick Check:
col-md-6 = half width on medium+ [OK]
Hint: Remember 12-grid system: number means parts of 12 width [OK]
Common Mistakes:
Thinking it applies to all screen sizes
Confusing '6' with percentage instead of grid parts
Assuming it hides the column
2. Which of the following is the correct Bootstrap class to make a column full width on small screens and half width on large screens?
easy
A. col-sm-12 col-lg-6
B. col-lg-12 col-sm-6
C. col-6 col-lg-12
D. col-sm-6 col-lg-12
Solution
Step 1: Understand screen size prefixes
sm means small screens (≥576px), lg means large screens (≥992px).
Step 2: Match widths to screen sizes
We want full width (12 parts) on small screens and half width (6 parts) on large screens, so col-sm-12 col-lg-6 fits.
Final Answer:
col-sm-12 col-lg-6 -> Option A
Quick Check:
Full width small + half large = col-sm-12 col-lg-6 [OK]
Hint: Use smaller breakpoint first, then larger breakpoint classes [OK]
But on small screens, Box 3 drops to a new line instead of staying in the same row. Why?
medium
A. Because col-sm-6 means full width on small screens
B. Because col-md-4 overrides col-sm-6 on small screens
C. Because the row class is missing
D. Because three columns of col-sm-6 each exceed 12 grid units, causing wrap
Solution
Step 1: Calculate total width on small screens
Each column uses col-sm-6, meaning 6 parts out of 12, so two columns fit per row (6+6=12).
Step 2: Understand why Box 3 wraps
Three columns each 6 parts wide total 18 parts, which is more than 12, so Box 3 wraps to next line.
Final Answer:
Because three columns of col-sm-6 each exceed 12 grid units, causing wrap -> Option D
Quick Check:
6+6+6 > 12 causes wrap [OK]
Hint: Sum col widths per row; >12 means wrap to next line [OK]
Common Mistakes:
Thinking col-md-4 affects small screens
Assuming row class is missing
Misunderstanding col-sm-6 width
5. You want a layout where on extra small screens all columns stack full width, on small screens two columns share the row equally, and on large screens three columns share the row equally. Which class set achieves this?
hard
A. col-6 col-sm-12 col-lg-4
B. col-12 col-sm-6 col-lg-4
C. col-sm-12 col-md-6 col-lg-4
D. col-12 col-md-4 col-lg-6
Solution
Step 1: Define widths for extra small screens
col-12 makes columns full width on extra small screens (default).
Step 2: Define widths for small screens
col-sm-6 makes two columns per row (6+6=12) on small screens.
Step 3: Define widths for large screens
col-lg-4 makes three columns per row (4+4+4=12) on large screens.
Final Answer:
col-12 col-sm-6 col-lg-4 -> Option B
Quick Check:
Stack, then 2 per row, then 3 per row = col-12 col-sm-6 col-lg-4 [OK]
Hint: Start from smallest screen, add classes for bigger breakpoints [OK]
Common Mistakes:
Mixing breakpoint order
Using wrong numbers for equal columns
Forgetting default col-12 for stacking
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.