Skip to content
Learn Netverks

Lesson

Step 6/36 17% through track

grid-system

The 12-column grid system

Last reviewed May 28, 2026 Content v20260528
Track mode
iframe_html
Means
HTML preview sandbox
Reading
~1 min
Level
beginner

This lesson

This lesson teaches The 12-column grid system—the ideas, syntax, and habits you need before moving on in Bootstrap.

Most modern layouts are built with flexbox and grid; skipping this lesson leaves responsive UI fragile.

You will apply The 12-column grid system in contexts like: Page layouts, dashboards, marketing sections, and component libraries.

Read the lesson, edit HTML/CSS in the playground, press Run to preview, then answer the lesson MCQs.

When the previous lesson's MCQs feel easy and you can explain The 12-column grid system in your own words.

Bootstrap’s grid is a mobile-first flexbox layout: a .container (or .container-fluid) wraps .row elements, and each .col-* divides horizontal space into up to twelve equal tracks.

Core building blocks

  • .row — flex container with negative horizontal margins cancelled by column padding
  • .col or .col-6 — flexible or fixed-width columns
  • .g-* — gutter utilities on the row (g-3, gx-4, gy-2)

Concepts from CSS flexbox and CSS grid still apply—Bootstrap wraps them in predictable class names. Tailwind’s grid-cols-12 solves a similar problem with utilities instead of col-md-4.

Important interview questions and answers

  1. Q: Why twelve columns?
    A: Twelve divides evenly by 2, 3, 4, and 6—common layout splits without fractional math in markup.
  2. Q: Flexbox or CSS Grid in Bootstrap 5?
    A: The main grid uses flexbox rows/columns; CSS Grid utilities exist separately for two-dimensional layouts when needed.

Self-check

  1. What three classes form the smallest valid grid?
  2. What does g-3 control?

Challenge

Three-column row

  1. Create a .row with three .col-md-4 columns.
  2. Narrow the preview below md — columns should stack.

Done when: three equal columns on medium+ viewports, stacked on small screens.

Interview prep

How many columns in the default grid?

Twelve columns per row; breakpoints control when column classes apply.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs in your browser in a sandboxed frame. Backend runners appear when this track’s profile allows them.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • Why 12 columns—what would you build with col-4?
  • Where does the row break without .row?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump