CDN stands for Content Delivery Network or Content Distribution Network. It helps us to improve the rendering time and website performance.
Bootstrap CDN is a free content delivery network that helps us to quickly load Bootstrap CSS, Javascript, and jQuery libraries on our projects to make projects responsive, mobile friendly, and attractive.
Bootstrap CDN Link and scripts
CSS link
Copy-paste the below CSS link to the <head> section of your code.
<link rel = "stylesheet" href = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"/>
JavaScript
<script src = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
Jquery library
<script src = "https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
Note: Without an internet connection, we can’t use the Bootstrap CDN.
How to use Bootstrap CDN
The below example shows that how we can use Bootstrap CDN on our code.
Code:
<!DOCTYPE html>
<html lang = "en">
<head>
<title>This is a Bootstrap CDN example</title>
<meta name = "viewport" content = "width = device-width, initial-scale=1">
<link rel = "stylesheet" href = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
</head>
<body>
<div class = "container">
<h1 align = "center"> Welcome to JavaTpoint</h1>
<p>Write your text here..</p>
</div>
<script src = "https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</body>
</html>
Leave a Reply