How to Install Bootstrap 4

How to Install Bootstrap 4

Bootstrap is a front-end CSS and jquery framework. It includes CSS jQuery and font files. To use Bootstrap in your websites you have to embed its CSS and jQuery files.

There are the 2 ways to embed Bootstrap 4 in your website

  • Embed Bootstrap 4 Using CDN
  • Download Bootstrap 4 and Embed

Embed Bootstrap 4 Using CDN

Bootstrap 4 CDN is a Content Delivery Network links which is used to embed bootstrap flies in your websites without download its doccument files.

Bootstrap 4 CDN Link

  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>

Why Use CDN Links

Maximum users use the CDN Links to their site because CDN provides fastest loading time. A major reason is used to CDN links is that when a person visite site which loaded site from cache which decreases the loading time of website.

Download Bootstrap 4

If you want to download the Bootstrap 4 and than embed it to your website than you have follow the below instructions.

  • First you have to download the Bootstrap doccument file from the https://getbootstrap.com/.
  • Than you have to create a HTML Page and than you have to include the bootstrap file with jquery and Javascript file.
  • And than apply the code using Bootstrap 4 classes to check your website will work properly or not.

Example 1 HTML Page applying Bootstrap 4 Download links.

<!DOCTYPE html>
<html>
<head>
	<title>Bootstrap Website</title>
	<meta http-equiv="Content-Type" content="text.html" charset="utf-8">
	<link rel="stylesheet" href="css/bootstrap.min.css">
	<script src="jquery.js"></script>
	<script src="js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
	<h1>Welcome To Bootstrap 4</h1>
</div>
</body>
</html>

On the above code the downloaded bootstrap 4 files are linked to this HTML page with link tag. Here we give the path of the folder and links. Here you also have to download the jQuery and embed the jQuery.

Note: Here you have to download the jQuery from https://jquery.com/download/

You can leave a response, or trackback from your own site.
Leave a Reply to the article

Learning & Certifications
Follow Us
Facebook Icon   Linked In Icon   Twitter Icon  
Validation and Recognition

Valid CSS! Valid HTML5!          Protected by Copyscape