Bootstrap 5: Interactive Examples & Tutorials

Ruth Jul 09, 2026

Bootstrap, the popular CSS framework, has evolved significantly over the years, and its fifth iteration, Bootstrap 5, is here with a host of new features and improvements. If you're new to Bootstrap or looking to upgrade your projects, understanding its examples and components is crucial. Let's dive into a comprehensive guide on Bootstrap 5 examples.

Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5

Bootstrap 5, released in November 2020, brings a fresh take on the framework with a new design system, improved responsiveness, and better customization options. It's built to be more lightweight, faster, and easier to use than its predecessors. Let's explore its key features and components through practical examples.

Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5

Responsive Design and Grid System

Bootstrap 5's grid system is one of its most powerful features, enabling responsive design out of the box. It uses a 12-column layout that adjusts based on screen size, ensuring your website looks great on desktops, tablets, and mobile devices.

Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5

Here's a simple example of a responsive grid layout using Bootstrap 5's classes:

<div class="container">
  <div class="row">
    <div class="col-md-4">One of three columns</div>
    <div class="col-md-4">One of three columns</div>
    <div class="col-md-4">One of three columns</div>
  </div>
</div>

Responsive Images

Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5

Bootstrap 5 introduces a new class for responsive images, making it easier to serve appropriately sized images for different screen sizes. The `.img-fluid` class scales images while maintaining their aspect ratio, ensuring they never overflow their containers.

Here's an example of using `.img-fluid` class with an image:

<img src="..." alt="..." class="img-fluid">

Spacers and Utilities

Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5

Bootstrap 5 includes a new set of spacers and utilities classes to help you manage space, dimensions, colors, and other styles without custom CSS. These classes make it easier to create complex layouts and designs quickly.

Here's an example of using spacers to create gutters between columns:

<div class="container">
  <div class="row">
    <div class="col">Column</div>
    <div class="col ms-auto">Column with right gutter</div>
  </div>
</div>

New Components and Improvements

Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5

Bootstrap 5 comes with several new components and improvements to existing ones. Let's look at a couple of notable additions.

One of the most significant improvements is the new dropdown menu component. It's now easier to use and more customizable, with better support for dark mode and improved accessibility.

Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Website Landing Page using HTML CSS Bootstrap 5 #3 - Coding Yaar
Website Landing Page using HTML CSS Bootstrap 5 #3 - Coding Yaar
Bootstrap 5 Website Layout Design
Bootstrap 5 Website Layout Design
Bootstrap Photo Gallery
Bootstrap Photo Gallery
Fixed top navbar example · Bootstrap v5.1
Fixed top navbar example · Bootstrap v5.1
40+ Best Free Bootstrap Templates & Themes in 2026 — Speckyboy
40+ Best Free Bootstrap Templates & Themes in 2026 — Speckyboy
How to Build a PHP Admin Dashboard With Bootstrap 5
How to Build a PHP Admin Dashboard With Bootstrap 5
Bootstrap 5 Buttons with Icon and Text Tutorial & Demo — CodeHim
Bootstrap 5 Buttons with Icon and Text Tutorial & Demo — CodeHim
Bootstrap 5.3 (2025) Cheat Sheet
Bootstrap 5.3 (2025) Cheat Sheet
Bootstrap 5 Modal Form
Bootstrap 5 Modal Form
Bootstrap 5 tutorial - Learn how to get started without jQuery - Themesberg Blog
Bootstrap 5 tutorial - Learn how to get started without jQuery - Themesberg Blog
an image of a dashboard screen with different colors and numbers on it, as well as the
an image of a dashboard screen with different colors and numbers on it, as well as the
Best Bootstrap Admin Templates with Horizontal Menu and Tips
Best Bootstrap Admin Templates with Horizontal Menu and Tips
Free Bootstrap 5 Admin Dashboard - Kaiadmin Lite
Free Bootstrap 5 Admin Dashboard - Kaiadmin Lite

Dropdowns

Here's an example of a basic dropdown menu using Bootstrap 5's new classes and attributes:

<div class="dropdown">
  <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-expanded="false">
    Dropdown button
  </button>
  <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">
    <li><a class="dropdown-item" href="#">Action</a></li>
    <li><a class="dropdown-item" href="#">Another action</a></li>
    <li><a class="dropdown-item" href="#">Something else here</a></li>
  </ul>
</div>

Offcanvas

Bootstrap 5 introduces a new offcanvas component, providing a flexible way to toggle content in and out of view on larger screens. It's perfect for creating sidebars, chat windows, or other contextual panels.

Here's an example of an offcanvas component using Bootstrap 5's new classes and attributes:

<div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvasExample" aria-labelledby="offcanvasExampleLabel">
  <div class="offcanvas-body p-0">
    ...
  </div>
</div>
<button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasExample" aria-controls="offcanvasExample">
  Launch
</button>

As you can see, Bootstrap 5 brings numerous improvements and new features that make it easier to build responsive, modern websites and applications. Whether you're a seasoned developer or just starting with Bootstrap, understanding these examples and components will help you make the most of this powerful framework.

Embracing Bootstrap 5's new features and improvements will not only make your development process more efficient but also ensure your projects are future-proof and ready to adapt to the ever-changing web landscape. So, start exploring, experimenting, and building with Bootstrap 5 today!