The Wayback Machine - https://web.archive.org/web/20240118120036/https://www.geeksforgeeks.org/bootstrap-5/
Open In App
Related Articles

Bootstrap 5 Tutorial

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

Bootstrap 5 is a free and open-source collection of predefined CSS and JavaScript/jQuery code used for creating dynamic website layouts and web applications. Bootstrap 5 is the newest version and it is the most popular HTML, CSS, and JavaScript framework for creating responsive, mobile-first websites. It was officially released on 16 June 2020 after several months of redefining its features. This Bootstrap 5 Tutorial helps beginners and experienced to design responsive web pages.

Bootstrap 5 Tutorial

Benefits of using Bootstrap 5

  • Bootstrap makes it simple to get started with coding. Using Bootstrap, even if you don’t know much about coding, you can create an appealing landing page. The sole requirement is that you have some CSS and HTML experience.
  • Sliders, drop-down menus, tabs, and other interactive components are needed to make the pages more engaging. With Bootstrap on your side, you can quickly add these components because the Bootstrap package includes various JavaScript plugins.
  • One of the most significant benefits of utilizing Bootstrap is its cross-browser compatibility. Heave a breath of relief when it comes to presenting your landing page across numerous browsers with Bootstrap by your side.

Getting started with Bootstrap 5 Tutorial

Layout

Content

Forms

Forms Layout

Components

Helpers

Utilities

Extend

Features

Bootstrap 5 brings major changes to the core by modifying the required dependencies, changes to the components and classes, which were used in the previous versions, browser support & many more. Some of the major changes are listed below:

  • Components use the data attributes to include the behavior & property to the element, which are used with the help of some JavaScript functionalities in the previous versions.
  • In Bootstrap 5, there is no need to use the jQuery as a dependency. However, the Popper.js is still required.
  • There are new Sass variables are introduced that help to customize the properties for the default class behavior.
  • New Utility Classes have been added for spacing, sizing, and other common tasks, to provide flexibility and options for styling.
  • The Grid System has been improved, which helps to improve the column order, offset classes, along with new grid tier classes.

What’s new in Bootstrap 5?

  • jQuery Support: In Bootstrap 5, there is no need for jQuery library anymore that makes it easier to use. You can simply use Bootstrap without it.
  • CSS custom properties: Bootstrap 5’s generated CSS has about two dozen CSS custom properties, with dozens more on the pipeline for greater component customisation.
  • Improved Grid System: The grid system in Bootstrap 5 layouts and aligns information using a sequence of containers, rows, and columns. It is entirely responsive and developed with flexbox.
  • Improved Documentation: More information has been added to the documentation, particularly when it comes to customisation. Bootstrap 5 has a fresh look, as well as improved customization options.
  • Improved form Controls: In Bootstrap 5, all custom form controls are now customised. All radio buttons, checkboxes, files, ranges, and other controls have the same appearance and behaviour across browsers.
  • Bootstrap 5 Adds Utilities API: In Bootstrap 5, they’ve gone with an API approach with a new Sass language and syntax. This gives you the ability to build new utilities while also allowing you to remove or change the defaults.
  • New Bootstrap Icon Library: With almost 1,300 icons, Bootstrap now has its own open source SVG icon collection. Although it was created specifically for the framework’s components, you can use it on any project.

What has been dropped?

  • Color utility classes(For example, .bg-primary) are used instead of Badge color classes(for example, badge primary).
  • The .rounded-pill class is introduced to give a pill style to a badge instead of using the .badge-pill badge class.
  • Display Utility Classes like .d-block has replaced .btn-block button class.
  • The jumbotron component has been dropped as the same results can be achieved using utility classes.
  • Popper’s configuration is used instead of the flip option for dropdown components.
  • Media Components have been dropped as the same results can be achieved using utility classes.
  • .pre-scrollable has been dropped owing to less usage.
  • .text-justify has been dropped owing to responsiveness issues.
  • Support for IE has been completely dropped.

Bootstrap 5 FAQ’s

Q1. What is Bootstrap 5 ?

Ans: Bootstrap 5 is a open-source front-end framework that enables users to make the responsive and mobile-first web applications.

Q2. What is the current version of Bootstrap 5 ?

Ans: The current version of Bootstrap 5 is version 5.3

Q3. What are the various techniques to use the Bootstrap 5 ?

Ans: Bootstrap 5 can be utilized in 3 ways, i.e., by downloading from the official site and then include it locally, by implementing the required CDN links, and by using npm or Yarn commands.

Q4. Is Bootstrap 5 supports the Mobile-First Design ?

Ans: Yes, Bootstrap 5 utilizes a responsive grid system to adapt the different designs on the various types of device-width, which in turns, ensuring the mobile-first approach.

Q5. How to customize the Bootstrap 5 pre-defined Classes ?

Ans. Bootstrap 5 provides the built with Sass, which has the capability to customize the variable, properties, etc, which, in turn, recomplied to get the CSS.


Learn to code easily with our course Coding for Everyone. This course is accessible and designed for everyone, even if you're new to coding. Start today and join millions on a journey to improve your skills!

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Commit to GfG's Three-90 Challenge! Purchase a course, complete 90% in 90 days, and save 90% cost click here to explore.
Last Updated : 09 Jan, 2024
Like Article
Save Article
Share your thoughts in the comments
Similar Reads
Complete Tutorials