What is the Bootstrap grid system and how does it work?

Beginner

Answer

The Bootstrap grid system is a flexbox-based layout system that uses containers, rows, and columns to create responsive layouts.

Key concepts:

  • 12-column system: Each row is divided into 12 equal columns
  • Responsive breakpoints: xs, sm, md, lg, xl, xxl
  • Mobile-first: Designed for mobile devices first, then scales up

Basic structure:

<div class="container">
  <div class="row">
    <div class="col-md-6">Column 1</div>
    <div class="col-md-6">Column 2</div>
  </div>
</div>