Lesson 4 of 60 – Bootstrap Versions
7%

Bootstrap Versions

Bootstrap has evolved through several major versions. Each version introduced improvements to responsive design, components, utilities, layout systems, customization, and browser support.

Note: The major Bootstrap versions are Bootstrap 1, 2, 3, 4, and 5. Modern Bootstrap development mainly uses Bootstrap 5.

1. What is a Bootstrap Version?

A Bootstrap version represents a particular release of the Bootstrap framework with its own features, components, classes, and improvements.

For example, Bootstrap 3, Bootstrap 4, and Bootstrap 5 have different APIs and class names in some areas.

2. Bootstrap 1

Bootstrap was first publicly released in 2011. It was originally created at Twitter by Mark Otto and Jacob Thornton.

The first version provided reusable CSS and interface components for building web pages more consistently.

3. Bootstrap 2

Bootstrap 2 was released in 2012. It improved the framework and introduced responsive design features.

Responsive features allowed websites to adapt more effectively to different screen sizes.

4. Bootstrap 3

Bootstrap 3 was released in 2013. It introduced a stronger mobile-first approach and improved responsive layout capabilities.

Bootstrap 3 became a very widely used version of Bootstrap.

5. Bootstrap 4

Bootstrap 4 was released in 2018. It introduced significant changes and improvements to the framework.

One important change was the extensive use of CSS Flexbox for layouts.

6. Bootstrap 5

Bootstrap 5 was released in 2021. It introduced modern improvements and removed the dependency on jQuery.

Bootstrap 5 also expanded utility classes and improved customization.

7. Bootstrap Version Timeline

Version Year Main Development
Bootstrap 1 2011 Initial public release
Bootstrap 2 2012 Responsive features
Bootstrap 3 2013 Mobile-first approach
Bootstrap 4 2018 Flexbox and updated components
Bootstrap 5 2021 Modern JavaScript and no jQuery dependency

8. Bootstrap 3 Mobile-First Design

Bootstrap 3 emphasized mobile-first design. This approach starts with styles for smaller screens and then uses responsive breakpoints for larger screens.

<div class="col-sm-6">
    Content
</div>

9. Bootstrap 4 and Flexbox

Bootstrap 4 made extensive use of CSS Flexbox. Flexbox provides useful tools for arranging, aligning, and distributing elements.

<div class="d-flex
justify-content-center">

    Content

</div>

10. Bootstrap 4 and Utility Classes

Bootstrap 4 provided many utility classes for spacing, display, alignment, sizing, and other common styling tasks.

<div class="mt-3 p-4 text-center">
    Bootstrap 4
</div>

11. Bootstrap 5 and jQuery

Bootstrap 5 removed the dependency on jQuery. Its interactive components use modern JavaScript instead.

This allows Bootstrap 5 projects to use Bootstrap's JavaScript components without adding jQuery as a dependency.

12. Bootstrap 5 Utility Improvements

Bootstrap 5 expanded its utility API and introduced additional utility options for developers.

Utilities can be used for spacing, positioning, display, sizing, alignment, colors, and other common design requirements.

13. Bootstrap 5 RTL Support

Bootstrap 5 provides support for right-to-left layouts.

RTL layouts are useful when developing interfaces for languages that are written from right to left.

14. Bootstrap 5 CSS Custom Properties

Bootstrap 5 uses CSS custom properties in various components and utilities. This provides additional ways to customize Bootstrap interfaces.

:root {
    --bs-primary: #0d6efd;
}

15. Bootstrap 5.0

Bootstrap 5.0 was the first major release in the Bootstrap 5 series. It brought the framework toward a more modern JavaScript and CSS architecture.

The release removed jQuery as a dependency and introduced several utility and component improvements.

16. Bootstrap 5.1

Bootstrap 5.1 introduced additional improvements to components, utilities, documentation, and customization.

It continued the development of the Bootstrap 5 series.

17. Bootstrap 5.2

Bootstrap 5.2 introduced improvements to customization and component behavior and made greater use of CSS custom properties.

It also introduced features that made color-mode customization easier.

18. Bootstrap 5.3

Bootstrap 5.3 continued improving color modes, utilities, components, and customization.

It introduced and improved support for light and dark color modes.

19. Light and Dark Modes

Modern Bootstrap versions can support different color modes, including light and dark themes.

<html data-bs-theme="dark">
    ...
</html>

The data-bs-theme attribute can be used to apply a color mode to an element or document.

20. Bootstrap Icons

Bootstrap Icons is a separate icon library designed to work well with Bootstrap projects.

It is not included automatically with the core Bootstrap CSS and JavaScript package.

21. Bootstrap 3 vs Bootstrap 4

Feature Bootstrap 3 Bootstrap 4
Mobile-first Yes Yes
Flexbox Limited use Extensively used
Grid Responsive Responsive
Utilities Available Expanded

22. Bootstrap 4 vs Bootstrap 5

Feature Bootstrap 4 Bootstrap 5
jQuery Dependency Used by Bootstrap JavaScript Removed
JavaScript Uses jQuery-based plugins Uses modern JavaScript
Utilities Many utilities More extensive utility system
RTL Support Not built into the core in the same way Supported
Customization Good More flexible

23. Why Developers Upgrade Versions

Developers may upgrade to newer Bootstrap versions to gain access to new features, improved components, better utilities, updated browser support, and modern development practices.

However, upgrading an existing project may require changes because some classes, components, or behaviors can change between major versions.

24. Major Version Changes

Major Bootstrap versions can introduce breaking changes. Therefore, developers should check the documentation and migration guide before upgrading a large project.

25. Bootstrap Version and Class Names

Some Bootstrap classes have changed between major versions. For example, Bootstrap 5 introduced several changes compared with Bootstrap 4.

Therefore, code written for one version should not automatically be assumed to work exactly the same way in another major version.

26. Choosing a Bootstrap Version

When starting a new project, developers should consider the version that matches their project's requirements, browser requirements, existing code, and available documentation.

For learning modern Bootstrap development, Bootstrap 5 is an important version to understand.

27. Bootstrap 5 CDN Example

<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
rel="stylesheet">

The version number in the CDN URL identifies the Bootstrap release being loaded.

28. Checking Your Bootstrap Version

The version of Bootstrap used by a project depends on how Bootstrap was installed or included.

If a project uses a CDN, check the Bootstrap version specified in the CDN URL. If it uses downloaded files or a package manager, check the project's installed package version.

29. Bootstrap Version Summary

Version Year Important Point
Bootstrap 1 2011 Initial public release
Bootstrap 2 2012 Responsive features
Bootstrap 3 2013 Mobile-first approach
Bootstrap 4 2018 Flexbox and improved utilities
Bootstrap 5 2021 Modern JavaScript and no jQuery dependency

30. Which Bootstrap Version Should You Learn?

Bootstrap has changed significantly over time. Understanding the history of its major versions is useful when working with older projects.

For a new tutorial focused on modern Bootstrap development, Bootstrap 5 is the appropriate version to study because it uses modern JavaScript, provides extensive utilities, supports responsive layouts, and includes modern customization features.

While learning Bootstrap 5, it is still useful to know that Bootstrap 3 and Bootstrap 4 are widely encountered in older projects.

📌 Key Points

  • Bootstrap 1 was publicly released in 2011.
  • Bootstrap 2 was released in 2012.
  • Bootstrap 3 was released in 2013.
  • Bootstrap 4 was released in 2018.
  • Bootstrap 5 was released in 2021.
  • Bootstrap 3 emphasized mobile-first design.
  • Bootstrap 4 made extensive use of Flexbox.
  • Bootstrap 5 removed the jQuery dependency.
  • Bootstrap 5 expanded utilities and customization options.
  • Bootstrap 5 supports RTL layouts.
  • Modern Bootstrap versions support light and dark color modes.
  • Major version upgrades can contain breaking changes.
  • Older Bootstrap projects may use Bootstrap 3 or Bootstrap 4.

🧠 Quick Quiz

Question: Which Bootstrap version removed the jQuery dependency?