Bootstrap is the most popular HTML, CSS, and JavaScript framework for building responsive, mobile-first web applications, originally developed by Twitter and maintained as an open-source project. It provides a comprehensive 12-column grid system, extensive pre-built components, and powerful utility classes that accelerate development while ensuring consistent, professional design across all devices. Key to effective Bootstrap usage is understanding that utility classes trump custom CSS in most scenarios β combining them strategically creates flexible, maintainable layouts without writing verbose stylesheets, while the framework's breakpoint-driven responsive approach ensures seamless adaptation from mobile phones to ultra-wide displays. As of 2026, Bootstrap 5.3.x is the current stable version, introducing color modes (dark/light theming), new utility APIs, and a richer set of helpers.
What This Cheat Sheet Covers
This topic spans 47 focused tables and 453 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Grid System Fundamentals
| Class | Example | Description |
|---|---|---|
<div class="container"> | β’ Creates a responsive fixed-width container that centers content β’ max-width changes at each breakpoint. | |
<div class="container-fluid"> | Creates a full-width container spanning 100% of viewport width at all breakpoints. | |
<div class="container-md"> | Container is 100% width until specified breakpoint (sm, md, lg, xl, xxl), then becomes fixed-width. | |
<div class="row"> | β’ Creates a horizontal group of columns using flexbox β’ applies negative margins to offset column padding. | |
<div class="col"> | Creates an equal-width column that automatically shares available space with sibling columns. | |
<div class="col-8"> | β’ Creates a column spanning specified number of grid units (1β12) β’ col-6 occupies half the row. | |
<div class="col-md-6"> | β’ Column width applies only at specified breakpoint and above β’ stacks full-width below for mobile-first design. |