The Wayback Machine - https://web.archive.org/web/20240907022851/https://www.geeksforgeeks.org/bootstrap-5-introduction/
Open In App

Bootstrap 5 Introduction

Last Updated : 19 Mar, 2024
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Bootstrap is a free and open-source collection of CSS and JavaScript/jQuery code used for creating dynamic websites layout and web applications. Bootstrap is one of the most popular front-end frameworks which has really a nice set of predefined CSS codes. Bootstrap uses different types of classes to make responsive websites. Bootstrap 5 was officially released on 16 June 2020 after several months of redefining its features.

Bootstrap is a framework that is suitable for mobile-friendly web development. it means the code and the template available on bootstrap are applicable to various screen sizes. It is responsive for every screen size. The framework is free and can be used in 2 ways that are either by downloading the zip files and including libraries/modules of bootstrap in the project or directly including the URL of bootstrap and using the online version.

Some important changes in Bootstrap 5: 

1. Updated official documentation: The docs homepage of v4.5.0 has an updated look and there are some improvements in the rest of the official docs too. Bootstrap docs have some nice padding around the corners to make it more readable and highlight its content.

2. jQuery is removed completely: Earlier, bootstrap components like modals, tooltips, popovers etc, were dependent on jQuery and popper.js. After the release of the alpha 5 version, Bootstrap no longer depends on jQuery. While jQuery has been used in Bootstrap for more than 8 years, many developers had this issue that jQuery brought uneven access to complex JavaScript behaviors to them. The whole process made possible by their JavaScript maintainer https://github.com/johann-s

3. Switch to Vanilla JavaScript: JavaScript is the programming language of the web. Most of the modern websites are powered by JavaScript and all modern web browsers on phones, tablets, consoles, desktops include JavaScript Interpreters. One of the major reasons of dropping jQuery was to redefine the framework completely on modern JavaScript standards.

4. Dropped support of Internet Explorer 10 and 11: Internet Explorer was released in 1995 by Microsoft. As of today, Internet Explorer is no longer relevant with popular browsers like Chrome and Microsoft Edge which are built on chromium. When bootstrap decided to refine their framework purely on Vanilla JavaScript, they dropped the support of IE which is not compatible with modern JavaScript standards.

5. Responsive Fonts: Bootstrap has introduced responsive font sizes which will automatically resize the typography element according to the viewport size through the RFS Engine. RFS engine was developed to resize font sizes. It provides the facility to resize the CSS properties like “margin”, “padding”, “border-radius”, “box-shadow” by units.

6. Removed Cards: The new grid system of Bootstrap provides more responsive control of the layout. Hence, they removed unnecessary extra classes which can be designed by the new grid layout. The older versions of Bootstrap still support card system.

Example:

HTML




<div class="card-deck">
    <div class="card">
        <img class="card-img-top" src="..." 
            alt="Card image cap">
        <div class="card-body">
            <h5 class="card-title">Card title</h5>
            <p class="card-text">Sample Card text</p>
  
            <p class="card-text">
                <small class="text-muted">
                    Sample paragraph
                </small>
            </p>
  
        </div>
    </div>
    <div class="card">
        <img class="card-img-top" src="..." 
            alt="Card image cap">
        <div class="card-body">
            <h5 class="card-title">Card title</h5>
            <p class="card-text">Sample Card text</p>
  
            <p class="card-text">
                <small class="text-muted">
                    Sample paragraph
                </small>
            </p>
  
        </div>
    </div>
    <div class="card">
        <img class="card-img-top" src="..." 
            alt="Card image cap">
        <div class="card-body">
            <h5 class="card-title">Card title</h5>
            <p class="card-text">Sample Card text</p>
  
            <p class="card-text">
                <small class="text-muted">
                    Sample paragraph
                </small>
            </p>
  
        </div>
    </div>
</div>


7. Updated Forms: Bootstrap 5 has introduced a section completely dedicated to Bootstrap forms with improved documentation and components. It now has a single set of form controls and redesign existing elements instead of generating new elements through pseudo-elements. Bootstrap forms give a better look now.

HTML




<div class="form-check">
  <input class="form-check-input" 
    type="checkbox" value="" 
    id="flexCheckDefault">
  <label class="form-check-label" 
    for="flexCheckDefault">
    Default checkbox
  </label>
</div>
<div class="form-check">
  <input class="form-check-input" 
    type="radio" name="flexRadioDefault" 
    id="flexRadioDefault1">
  <label class="form-check-label" 
    for="flexRadioDefault1">
    Default radio
  </label>
</div>
<div class="form-check form-switch">
  <input class="form-check-input" 
    type="checkbox"
    id="flexSwitchCheckDefault">
  <label class="form-check-label" 
    for="flexSwitchCheckDefault">
    Default switch checkbox input
  </label>
</div>


Output:

8. New SVG and Icons library: Bootstrap 3 had introduced 250 reusable icon components called “Glyphicons” which were created to offer icons for alerts,dropdowns, input fields, etc. Bootstrap 4 completely removed glyphicons as most of the designers used icons from websites like Fontawesome, icons8, etc. Otherwise, they use their self created SVG icons to enhance customizability. Bootstrap 5 has released a new SVG icon library which was undertaken by the co-founder of Bootstrap Mark Otto. 

For more information refer to this link: Get Bootstrap 



Previous Article
Next Article

Similar Reads

Include Bootstrap in AngularJS using ng-bootstrap
AngularJS can be integrated with Bootstrap CSS and Javascript and can be used to create creative forms, tables, navigation bars, etc. Steps: Make sure the Angular CLI present in your system if not then run the command in the terminal to do so. npm install -g @angular/cli Create a new project on visual studio code by running the code ng new project-
2 min read
Difference between bootstrap.css and bootstrap-theme.css
Bootstrap is an HTML, CSS and JS front-end-framework used for developing responsive and mobile-first projects on the web. It is the framework that comes up with predefined terms, thus giving you the ability to use these codes instead of having to create the codes from scratch. It is a collection of HTML, CSS and JS code that is designed to help bui
5 min read
Difference Between Bootstrap 3 and Bootstrap 4
Bootstrap: Bootstrap was developed by Mark Otto and Jacob Thorton at Twitter in August 2011. It is an open-source framework that is used to design responsive websites faster and easier. It is the most popular open-source framework that includes HTML, CSS, and JavaScript. It can create web applications with any server-side Technology like Java, PHP,
2 min read
Difference between Bootstrap 4 and Bootstrap 5
What is Bootstrap? It is an open-source framework from late 2011 that is used for designing responsive websites with a mobile-first approach faster and easier. Bootstrap is available for HTML, CSS, and JS. According to server-side languages like PHP, Node, etc. bootstrap helps to design the frontend. Bootstrap has made the work for developers easie
3 min read
Bootstrap Cheat Sheet - A Basic Guide to Bootstrap
Bootstrap is a free, open-source, potent CSS framework and toolkit used to create modern and responsive websites and web applications. It is the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites. Nowadays, websites are perfect for all browsers and all sizes of screens. What is Bootstrap Cheat Sheet?A
15+ min read
Bootstrap 4 Introduction
Bootstrap is a free and open-source tool collection for creating responsive websites and web applications. It is the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites. It solves many problems which we had once, one of which is the cross-browser compatibility issue. Nowadays, the websites are perfect f
3 min read
BootStrap Introduction and Installation
To begin Web development you may go through this article first. Grid SystemButtons, Glyphicons, TablesVertical Forms, Horizontal Forms, Inline FormsDropDowns and Responsive TabsProgress Bar and JumbotronBootstrap is a free and open-source collection of tools for creating websites and web applications. It is the most popular HTML, CSS, and JavaScrip
4 min read
Angular ngx Bootstrap Introduction
Angular ngx Bootstrap is an open-source (MIT Licensed) project, that provides Bootstrap components powered by Angular, which does not require including any original JS components. This framework facilitates the creation of components with great styling with very easy to use, which, in turn, helps to make interactive &amp; responsive websites or web
4 min read
React Bootstrap Introduction
The most popular CSS framework for responsive layouts is Bootstrap. This open-source toolkit includes Sass variables, a responsive grid framework, and a large number of JavaScript plugins. It has now been redesigned in React so that it can work with React apps. Bootstrap 4 relies on jQuery, however, jQuery isn't ideal for React because it manipulat
4 min read
Bootstrap Buttons, Glyphicons, Tables
Introduction and Installation Grid System Vertical Forms, Horizontal Forms, Inline Forms DropDowns and Responsive Tabs Progress Bar and Jumbotron After the previous article, one should be familiar with the Grid System of Bootstrap. Now, we'll learn about making Buttons, the all new Glyphicons and Tables. Lets get started. Beautiful Buttons: We can
4 min read
Bootstrap DropDowns and Responsive Tabs
Introduction and InstallationGrid SystemButtons, Glyphicons, TablesVertical Forms, Horizontal Forms, Inline FormsProgress Bar and Jumbotron Dropdown Menu Using Bootstrap: In bootstrap, dropdowns are created using the class="dropdown". What we will do is create a button and then convert the button into a dropdown.As already stated in the last few tu
3 min read
Bootstrap 5 Reboot Misc elements
Bootstrap 5 Reboot Misc elements are some other tags that are used to reset browser defaults and can be used when we do not want to specify CSS explicitly. Reboot Misc Elements: Address: Reboot Address element is used to change the font style from italic to normal text. It inherits line height and the margin-bottom is set to 1 rem.Blockquote: This
2 min read
How to get circular buttons in bootstrap 4 ?
It is an open source toolkit for developing with the HTML, CSS, and JS. It includes several types of buttons, styles, fonts each of them serving its own semantic purpose which is predefined, with a few extras thrown for more control. You can use Bootstrap custom button styles to create your buttons and more with support for multiple sizes, states,
2 min read
Bootstrap Alerts , Wells, Pagination and Pager
Introduction and InstallationGrid SystemButtons, Glyphicons, TablesVertical Forms, Horizontal Forms, Inline FormsDropDowns and Responsive TabsProgress Bar and Jumbotron Alerts: We often see certain alerts on some websites before or after completing an action. These alert messages are highlighted texts that are important to take into consideration w
4 min read
Bootstrap Badges, Labels, Page Headers
Introduction and InstallationButtons, Glyphicons, TablesVertical Forms, Horizontal Forms, Inline FormsDropDowns and Responsive TabsProgress Bar and Jumbotron Badges: We all have seen some numerical indicators beside some links on various websites. These are called badges. These badges tell how many items are available or associated with the link. T
3 min read
Bootstrap Tooltips
In this article, we would be discussing the tooltip plugin provided by bootstrap. Tooltip is quite useful for showing the description of different elements in the webpage. Tooltip can be invoked on any element in a webpage. Tooltips on bootstrap depends on the 3rd party library Tether for positioning. Hence, we need to include tether.min.js before
4 min read
Bootstrap 5 Checks and Radios Disabled
Bootstrap 5 Checks and radios Disabled is used to make a checkbox/radio disabled, which means we won't be able to click on it. Its appearance will also get muted. Add the disabled attribute and the associated &lt;label&gt;s are automatically styled with a lighter color to indicate its disabled state. Bootstrap 5 Checks and Radios Disabled Class: Th
2 min read
Difference between Bootstrap and AngularJS
Bootstrap is a free and open source front-end web development framework. It is a giant collection of HTML, CSS, and JavaScript code that is designed to help build user interface components. It is a free collection of tools for creating websites and web applications. It is used by many developers and according to the official Bootstrap site: It is t
5 min read
Bootstrap 5 Navbar Supported Content
Bootstrap 5 Navbar Supported content contains Navbar which supports various sub-components like .navbar-brand, .navbar-nav, .navbar-text, .navbar-toggler, and .navbar-scroll. Brand: It is a company, project, or product name. We add .navbar-brand to various components like a heading or a link. We can add an image, text, or both image and text as our
2 min read
Bootstrap 5 Reboot Address
Bootstrap 5 Reboot is a collection of element-specific CSS that changes in a single file, kickstart Bootstrap provides an elegant, consistent, and simple baseline to build upon. Reboot Address element is used to change the font-style from italic to the normal text. It inherits the line-height property and set the margin-bottom property to 1rem. The
2 min read
Bootstrap | Badges and Breadcrumbs
Badges: Badges are numbers associated with the link to indicate the number of items associated with the link. The notification number is seen when logged in to a particular website and tells the numbers of news or notifications to see by clicking it. Example: C/C++ Code &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;badge example&lt;/
4 min read
How to make Timepicker using Angular UI Bootstrap ?
In this article, we will see how to make Dropdown using Angular UI bootstrap. Angular UI Bootstrap is an Angular JS framework created by Angular UI developers to provide better UI which can be used easily. Syntax: &lt;div uib-timepicker&gt;&lt;/div&gt; Download AngularUI from the link: https://angular-ui.github.io/bootstrap Approach: First, add Ang
1 min read
How to Apply Bootstrap Grid for Inline Elements ?
The Bootstrap Grid System is a flexible and responsive layout system that allows developers to create complex and responsive web layouts. The grid system uses a series of classes and CSS styles to create rows and columns. The grid system is built using the flexbox layout model, which allows elements to be easily resized and repositioned based on th
4 min read
How to create a two tone banner in bootstrap ?
Bootstrap is a CSS framework used to design webpages. It is the most widely used CSS framework all over due to its simplicity and ease of implementation. Bootstrap is used along with HTML and JavaScript to make the webpages interactive. Banners are section in the webpage that call for extra attention. There can be multiple banners in a webpage and
3 min read
How to write a form in different line using Bootstrap ?
Bootstrap is an open-source front-end framework for developing standard &amp; decorative websites or web applications that are fast and user-friendly. Bootstrap includes templates based on HTML and CSS for tables, forms, buttons, etc. Bootstrap also uses JavaScript and helps us to create responsive designs. Forms are a crucial building block of eve
2 min read
How to configure modal width in Bootstrap?
Bootstrap Modal: It is a dialog window that opens inside the browser window on triggering certain events. It is a really convenient way to improve the website's content rendering as per the requirements. In this article, we will focus on adjusting the width/height of the modal box.Method 1: Using pre-defined Bootstrap classes Bootstrap has pre-defi
2 min read
How to remove arrow in dropdown in Bootstrap ?
Dropdowns are one of the important components that are an integral part of any web application. Bootstrap provides its own interactive version of this component. Bootstrap dropdowns are toggled by clicking, not hovering as it was an intentional design decision. To use Dropdowns in a web project, include Popper.js into the project. Every Bootstrap d
2 min read
Bootstrap 5 Layout Form Grid
Bootstrap 5 Layout Form Grid is used to create a complex form using grid classes. The form grid layout required multiple columns of different widths and alignments. To create a form grid, we use .row and .col classes. Form Grid Layout used Classes: .row: This class is used to create a row of a form layout..col: This class is used to create columns
2 min read
Visibility of elements in bootstrap with Examples
There are some situations where it is needed to hide some content on a webpage without affecting the layout of the page. Bootstrap uses the CSS visibility property and provide two classes visible and invisible to control the visibility of an element on a web page.These classes do not affect the layout i.e. invisible elements will still take up spac
3 min read
Bootstrap 5 Text
In this article, we will discuss how to change the alignment, weight, line height, wrapping, font size of the text, and more with the help of Bootstrap 5 utilities. Text alignment: We can use text alignment classes to align the text in different positions in different viewports.Text wrapping and overflow: To wrap a text we need to use the .text-wra
4 min read
Article Tags :