Challenge - 5 Problems
Bootstrap Column Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
๐ง Conceptual
intermediateUnderstanding Bootstrap column sizing
In Bootstrap's grid system, what does the class
col-6 mean for a column inside a row?Attempts:
2 left
๐ก Hint
Bootstrap grid divides the row into 12 equal parts.
โ Incorrect
In Bootstrap, the grid system divides the row into 12 equal parts. The class col-6 means the column uses 6 of those 12 parts, so half the row width.
๐ Syntax
intermediateWhich Bootstrap class creates a column that is one quarter width?
You want a column that takes exactly 1/4 of the row width. Which class should you use?
Attempts:
2 left
๐ก Hint
Remember the grid is divided into 12 parts.
โ Incorrect
Since 12 divided by 4 is 3, col-3 means the column takes 3 out of 12 parts, which is one quarter of the row.
โ rendering
advancedVisual layout with mixed column sizes
Given this HTML snippet, what will be the visual width distribution of the columns inside the row?
<div class="row"> <div class="col-4">A</div> <div class="col-8">B</div> </div>
Attempts:
2 left
๐ก Hint
Bootstrap columns add up to 12 parts per row.
โ Incorrect
The col-4 class means 4 parts out of 12, and col-8 means 8 parts out of 12. So column A is 4/12 and column B is 8/12 of the row width.
โ selector
advancedSelecting columns with specific width in CSS
You want to write a CSS rule that targets only Bootstrap columns that take exactly 3 parts of the grid (col-3). Which selector is correct?
Attempts:
2 left
๐ก Hint
Bootstrap column classes are named col-1, col-2, ..., col-12.
โ Incorrect
The class .col-3 targets exactly the columns with class col-3. The other selectors are either too broad or incorrect.
โ accessibility
expertEnsuring accessible layout with Bootstrap columns
When using Bootstrap column classes like
col-1 through col-12, what is the best practice to ensure screen readers understand the layout order correctly?Attempts:
2 left
๐ก Hint
Screen readers read content in the order it appears in the HTML.
โ Incorrect
Using semantic HTML and keeping the logical order in the markup ensures screen readers read content in the correct sequence. Visual reordering with CSS can confuse assistive technologies.
