Course Content
Bootstrap 5 Alerts
0/1
Bootstrap
About Lesson

How to use bootstrap 5:

There are two ways to start using bootstrap:

  • Bootstrap 5 from a Content Delivery Network (CDN), or
  • Downloading it from the official website, getbootstrap.com.

1.CDN: Including Bootstrap 5 from a CDN is quick and easy. You can simply link to the Bootstrap CSS and JavaScript files hosted on a CDN in your HTML file, like this:

Example:

HTML
<!-- CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"integrity="sha384EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">

<!-- JavaScript (optional) -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>

2.Download: Alternatively, you can download Bootstrap 5 directly from the official website. Visit getbootstrap.com, navigate to the “Download” section, and choose the files you need for your project. You can download the pre-compiled CSS and JavaScript files, or you can customize Bootstrap using the online customization tool and download a custom build tailored to your needs.

Both methods have their advantages. Using a CDN can save bandwidth and improve load times for your visitors, while downloading Bootstrap gives you more control over your assets and allows you to work offline. Choose the method that best fits your project’s requirements!