DEV Community

Cover image for Day 1 Introduction and installation of Bootstrap 5
Brijesh Dobariya
Brijesh Dobariya

Posted on

Day 1 Introduction and installation of Bootstrap 5

Bootstrap – The word does not need introduction in the web development and the web designing world. It is one of the most popular front-end development platforms.

For easy to learn Codedthemes Introduced “A Complete Bootstrap 5 tutorial” series. In this series, you can learn from scratch till the end.

Before start Bootstrap 5 let us get to know what is a bootstrap and why it is used?

What is Bootstrap?

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 web sites. It solves many problems which we had once, one of which is the cross-browser compatibility issue. Nowadays, the websites are perfect for all the browsers (IE, Firefox and Chrome) and for all sizes of screens (Desktop, Tablets, and Phones).

History of Bootstrap

The 1st bootstrap version release in 2011. It is gained a lot of temptation because it is free, opensource, CSS framework for creating highly meaningful web development application.

The 2nd version of the bootstrap release in January 2012 released with some existing and new features. The best feature of the 2nd version is Glyph icons. The 2nd version is more responsive and mobile-friendly than the 1st version.

The 3rd version release in 2013 with some minor changes to make the framework better.

• The 4th version release after long intervals. The version released in 2018 with more change in the framework. Bootstrap 4 key feature is Replace LESS with SAAS, IE8, IE 9 AND IOS 6 support remove, re-written a code, etc.

The 5th version released on June 16, 2020 it is known as Bootstrap 5 Alpha version and complete Bootstrap 5 Beta 3 version released on March 22, 2021. The key feature of the version is New look and feel, Bootstrap no longer depends on jQuery and they have dropped support for Internet Explorer, Enhanced Grid system.

Why Bootstrap?

Here are some of the key usages of Bootstrap listed:

Browser supportive: Every browser supports this Bootstrap Framework.

Mobile-first approach: In the Bootstrap 3 framework, there is a pre-existing mobile-first style all through the library and not as separate files.

Simple and easy to start:If you know HTML and CSS, you can quickly start working with Bootstrap, and its documentation is provided on the official site.

Responsive design and looks: Web pages designed using the Bootstrap framework has responsive CSS that can adjust to the screen size of large desktops, notebooks, tablets, and mobiles.

Easy customization: It provides some built-in components and functionalities that are easy for customizing.

Clean interface or Developers: Bootstrap framework provides a new and consistent result for building user interfaces in web pages.

Benefits of Bootstrap Framework

• It produces less cross-browser bugs.

• It is a consistent framework supported by all the browsers plus CSS-based compatibility fixes.

• It is a lightweight and hence widely used framework for creating responsive sites.

• Looks, structure, and styles can be customized as per requirement.

• A simple and effective grid system.

Installation of Bootstrap 5

Compiled CSS and JS

Download ready-to-use compiled code for Bootstrap v5.2.0-beta1 to easily drop into your project, which includes:

• Compiled and minified CSS bundles

• Compiled and minified JavaScript plugins

Note: This does not include documentation, source files, or any optional JavaScript dependencies.

Source Files

Compile Bootstrap with your own asset pipeline by downloading our source Sass, JavaScript, and documentation files. This option requires some additional tooling:

• Sass compiler for compiling Sass source files into CSS files

• Autoprefixer for CSS vendor prefixing

Should you require Bootstrap full set of build tools, they are included for developing Bootstrap and its docs, but they’re likely unsuitable for your own purposes.

CDN via jsDelivr

Skip the download with jsDelivr to deliver cached version of Bootstrap’s compiled CSS and JS to your project.

<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/js/bootstrap.bundle.min.js" integrity="sha384-pprn3073KE6tl6bjs2QrFaJGz5/SUsLqktiwsUTF55Jfv3qYSDhgCecCxMW52nD2" crossorigin="anonymous"></script>
Enter fullscreen mode Exit fullscreen mode

If you’re using Bootstrap compiled JavaScript and prefer to include Popper separately, add Popper before our JS, via a CDN preferably.

<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.5/dist/umd/popper.min.js" integrity="sha384-Xe+8cL9oJa6tN/veChSP7q+mnSPaj5Bcu9mPX5F5xIGE0DVittaqT5lorf0EI7Vk" crossorigin="anonymous"></script>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/js/bootstrap.min.js" integrity="sha384-kjU+l4N0Yf4ZOJErLsIcvOU2qSb74wXpOhqTvwVx3OElZRweTnQ6d31fXEoRD1Jy" crossorigin="anonymous"></script>
Enter fullscreen mode Exit fullscreen mode

Package managers

Pull in Bootstrap’s source files into nearly any project with some of the most popular package managers. No matter the package manager, Bootstrap will require a Sass compiler and Autoprefixer for a setup that matches our official compiled versions.

npm

Install Bootstrap in your Node.js powered apps with the npm package:

npm install bootstrap@5.2.0-beta1
Enter fullscreen mode Exit fullscreen mode

yarn

Install Bootstrap in your Node.js powered apps with the yarn package:

yarn add bootstrap@5.2.0-beta1
Enter fullscreen mode Exit fullscreen mode

Top comments (0)