Adding Bootstrap via CDN
The fastest way to start using Bootstrap is by including its CSS and JavaScript files via CDN (Content Delivery Network). This approach requires no download or setup — just copy and paste the CDN links into your HTML file.
Step 1: Add Bootstrap CSS
Paste the following inside the <head> section of your HTML:
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-..." crossorigin="anonymous">
Step 2: Add Bootstrap JavaScript Bundle
Paste the following just before the closing </body> tag:
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-..." crossorigin="anonymous"></script>
bootstrap.bundle.min.js includes both Bootstrap’s JavaScript and Popper (used for tooltips, dropdowns, etc.).
Complete Example:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bootstrap CDN Example</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container py-5">
<h1 class="text-primary">Hello Bootstrap 5!</h1>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>


