How to Include Bootstrap 5 in our webpage ?

Published on : July 28,2022
How to Include Bootstrap 5 in our webpage ?

Hi Dev,

In this article we will learn example about bootstrap 5. Let's start…

What is Bootstrap ?

Bootstrap is the one of the most popular CSS Framework for developing responsive and mobile-first websites. Bootstrap 5 is the newest version of Bootstrap. 

Bootstrap gives you ability to create flexible and responsive web layouts with much less efforts. Bootstrap was originally developed by a designer and a developer at Twitter in mid of 2010. Before being an open-sourced framework, Bootstrap was known as Twitter Blueprint.

You can save a lot of time and effort with Bootstrap. So bookmark this website and continue on.


How to include Bootstrap in out app?

Step 1: Creating a Basic HTML file as bellow

Open up your favorite code editor and create a new HTML file. Start with an empty window and type the following code and save it as "index.html" on your system folder.

<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Basic HTML File</title>
    <h1>Hello, world!</h1>


Step 2: Making this HTML File a Bootstrap Template

After make this plain HTML file a Bootstrap template, just include the Bootstrap CSS and JS files using their CDN links. Also, you should include JavaScript files at the bottom of the page, right before the closing </body> tag to improve the performance of your website pages.

<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Basic Bootstrap Template Example</title>
    <!-- Bootstrap CSS -->
    <link href="" rel="stylesheet" crossorigin="anonymous">
    <h1>Hello, world!</h1>
    <!-- Bootstrap JS Bundle with Popper -->
    <script src="" crossorigin="anonymous"></script>


Step 3: Saving and Viewing the File

Now save the file on your desktop as "bootstrap-example-template.html".

To open this file in a web browser, navigate to it, then right click on it, and select your favorite web browser. Alternatively, you can open your browser and drag this file to it.


Adding Bootstrap Localy

Alternatively, you can also download the Bootstrap's CSS and JS files from their official website and include in your project. There are two versions available for download, compiled Bootstrap and Bootstrap source files. You can download Bootstrap 5 files from here.

Compiled download contains compiled and minified version of CSS and JavaScript files for faster and easier web development. The compiled version also includes optional JavaScript dependencies such as Popper bundled with Bootstrap JS (bootstrap.bundle.*). Whereas, the source download contains original source files for all CSS and JavaScript, along with a local copy of the docs.

Download and unzip the compiled Bootstrap. Now if you look inside the folders you'll find it contains the compiled CSS and JS files (bootstrap.*), as well as the compiled and minified CSS and JS (bootstrap.min.*). Use the bootstrap.min.css and bootstrap.bundle.min.js files.

Using the minified version of CSS and JS files will improve the performance of your website and saves the precious bandwidth because of lesser HTTP request and download size.

Hope it can help you…

Categories : Bootstrap

Tags : Sass jquery HTML Bootstrap

Praful Sangani
Praful Sangani
I'm a passionate full-stack developer with expertise in PHP, Laravel, Angular, React Js, Vue, Node, Javascript, JQuery, Codeigniter, and Bootstrap. I enjoy sharing my knowledge by writing tutorials and providing tips to others in the industry. I prioritize consistency and hard work, and I always aim to improve my skills to keep up with the latest advancements. As the owner of Open Code Solution, I'm committed to providing high-quality services to help clients achieve their business goals.


order fenofibrate 160mg for sale tricor online fenofibrate 160mg pills

tadalafil 10mg generic cialis 40mg drug buy sildenafil 100mg pill

precose pills buy griseofulvin buy griseofulvin

order aspirin 75 mg pill order imiquad imiquimod sale

dipyridamole oral plendil cost order pravachol 10mg generic

buy melatonin generic danazol 100 mg generic order danocrine 100mg pills

order florinef 100 mcg without prescription loperamide 2mg brand imodium 2 mg drug

dydrogesterone 10mg canada buy duphaston medication order empagliflozin 25mg online

buy prasugrel pills buy detrol generic detrol cost

order ferrous generic where to buy ascorbic acid without a prescription betapace price

order mestinon pills order feldene 20mg sale order rizatriptan 10mg online cheap

buy enalapril paypal duphalac cost buy duphalac bottles

zovirax over the counter buy generic xalatan online how to buy exelon

buy betahistine pills for sale probenecid ca benemid 500 mg us

order prilosec online order prilosec 20mg generic buy lopressor for sale

order premarin 0.625mg online cheap dostinex 0.25mg price viagra online buy

buy telmisartan 80mg oral plaquenil molnunat 200 mg uk

order generic cialis 10mg sildenafil order viagra overnight

cenforce 100mg cost order chloroquine 250mg brand aralen 250mg

provigil 200mg oral deltasone medication prednisone usa

omnicef 300 mg price glucophage 500mg tablet buy prevacid pills

lipitor 80mg cost buy albuterol medication purchase amlodipine sale

azipro 250mg tablet cheap prednisolone online buy neurontin 800mg online

casino bonus order furosemide 100mg furosemide 40mg tablet

protonix pill brand protonix 20mg order phenazopyridine 200 mg pills

hollywood casino online purchase doxycycline online ventolin 4mg inhaler

Leave a comment

We'll never share your email with anyone else. Required fields are marked *

Related Articles

Bootstrap Alerts
Praful Sangani By Praful Sangani - August 03,2022
What is Bootstrap?
Praful Sangani By Praful Sangani - April 16,2023