A visual reference guide for the most commonly used Bootstrap classes
Bootstrap is an open-source CSS Framework developed by Twitter engineers in 2011. It helps developers quickly build responsive, mobile-first websites by providing ready-made CSS classes, a grid system, and reusable UI components like buttons, navbars, forms, and modals.
<link> (CSS) inside the <head> of
your page.
For best performance, place the JS bundle right before the closing
</body>.
Example:
Alternative: If you must paste both links into
<head>, the page will still work but placing scripts at the end of
the body is a better practice for faster page rendering.
After adding the links, paste this snippet somewhere inside the
<body> to check:
If you see a blue styled button, Bootstrap is correctly applied.
Pro tips:
https://cdn.jsdelivr.net/npm/bootstrap-icons@version/font/bootstrap-icons.css
or use any icon library.
integrity) and
crossorigin attributes if provided by the CDN provider.
Bootstrap's grid system uses containers, rows, and columns to layout and align content.
| Class | Purpose |
|---|---|
| .container | Fixed width container that centers content |
| .container-fluid | Full width container |
| .row | Horizontal group of columns |
| .col | Equal width column |
| .col-{breakpoint}-{size} | Responsive column (breakpoint: sm, md, lg, xl, xxl) |
This is bold text (.fw-bold)
This text is centered and red (.text-center, .text-danger)
This text is green (.text-success)
Format: {property}{sides}-{size}
Provide contextual feedback messages for typical user actions.
| Class | Purpose |
|---|---|
| .form-control | Styles form inputs |
| .form-label | Styles form labels |
| .form-select | Styles dropdown selects |
| .form-check | Styles checkboxes and radios |
| .mb-2, .mb-3 | Margin bottom utilities for spacing |
| Class | Purpose |
|---|---|
| .img-fluid | Makes images responsive |
| .rounded | Adds rounded corners |
| .rounded-circle | Makes image circular |
| .img-thumbnail | Adds a border and padding |
img-fluid makes image responsive, rounded adds rounded corners.