CHAPTER 03
Beginner
Bootstrap Grid System
Updated: May 18, 2026
5 min read
# CHAPTER 3
Bootstrap Grid System
1. Chapter Introduction
The Bootstrap grid system is the single most important concept in Bootstrap. Every professional layout — from landing pages to admin dashboards — is built on it. Understanding the grid means understanding responsive design. It is a 12-column system: you divide the row into columns that add up to 12, and Bootstrap handles every screen size automatically.2. Learning Objectives
- Understand containers, rows, and columns.
-
Use breakpoint-specific column classes (
col-md-6,col-lg-4).
- Create responsive layouts that change at different screen sizes.
- Nest grids within grids.
- Build a responsive portfolio layout.
3. Grid Structure: Container → Row → Columns
text
4. Containers
html
5. Basic Column Usage
html
6. Responsive Breakpoint Classes
text
html
7. Row Gutters (Column Gaps)
html
8. Alignment and Ordering
html
9. Nested Grids
html
10. Mini Project: Responsive Portfolio Layout
html
11. Common Mistakes
-
Forgetting
.rowwrapper: Columns (col-*) MUST be direct children of a.row. Without.row, columns won't align correctly.
-
Columns not adding up to 12: If you use
col-5+col-5, you get 10/12 — there will be empty space. Usecol-5+col-7orcol-auto.
12. MCQs
Question 1
How many columns does Bootstrap's grid system have?
Question 2
What class creates a full-width container?
Question 3
What is the minimum width for the md breakpoint?
Question 4
What do classes col-12 col-md-6 col-lg-4 mean?
Question 5
What class adds gaps between columns?
Question 6
What must direct children of .row be?
Question 7
col-md-4 offset-md-4 does what?
Question 8
What class vertically centers columns in a row?
Question 9
Can you nest rows and columns?
Question 10
What class justifies columns to the center horizontally?
13. Interview Questions
- Q: Explain the Bootstrap grid system and how it achieves responsive layouts.
- Q: What happens when Bootstrap column classes exceed 12 in a row?
14. Summary
The Bootstrap 12-column grid is the foundation of responsive web design. Container → Row → Columns is the three-level structure. Adding breakpoint prefixes (col-md-, col-lg-) makes the same HTML display differently on each screen size, eliminating the need for complex CSS media queries.