---
title: "How to include Bootstrap in an HTML file?"  
description: "How to include Bootstrap in an HTML file?"  
author: "Revati S Misra"  
published: 2023-05-12  
updated: 2023-05-12  
canonical: https://www.mindstick.com/forum/158302/how-to-include-bootstrap-in-an-html-file  
category: "bootstrap"  
tags: ["html", "bootstrap", "html form"]  
reading_time: 2 minutes  

---

# How to include Bootstrap in an HTML file?

How to include [Bootstrap](https://www.mindstick.com/articles/1555/image-viewer-using-bootstrap-carousel) in an [HTML](https://www.mindstick.com/articles/1530/design-a-simple-stylish-calculator-using-html-css-and-javascript) [file](https://www.mindstick.com/articles/59/encrypting-and-decrypting-files-using-c-sharp)?

## Replies

### Reply by Aryan Kumar

There are two ways to include Bootstrap in an HTML file:

## 1. Using a CDN

A CDN (content delivery network) is a network of servers that deliver content to users based on their location. This can improve the performance of your website by delivering the content from a server that is closer to the user.

To include Bootstrap using a CDN, you will need to add the following code to your HTML file:

Code snippet

```plaintext
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
```

## 2. Downloading and linking to the Bootstrap files

You can also download the Bootstrap files and link to them from your HTML file. To do this, you will need to download the Bootstrap CSS and JavaScript files from the Bootstrap website.

Once you have downloaded the files, you will need to add the following code to your HTML file:

Code snippet

```plaintext
<link rel="stylesheet" href="bootstrap.min.css">
<script src="bootstrap.min.js"></script>
```

Once you have included Bootstrap in your HTML file, you can start using Bootstrap components and classes to create your website.

Here are some additional tips for including Bootstrap in an HTML file:

- **Use the latest version of Bootstrap.** Bootstrap is constantly being updated with new features and bug fixes. Make sure that you are using the latest version of Bootstrap to get the best possible experience.
- **Only include the Bootstrap files that you need.** Bootstrap is a large framework, and you may not need all of the files. You can choose to only include the files that you need to reduce the size of your website.
- **Use a CDN to improve performance.** Using a CDN can improve the performance of your website by delivering the content from a server that is closer to the user.
- **Test your website on different devices.** Bootstrap is responsive, which means that your website will look good on all devices. Make sure to test your website on different devices to make sure that it looks good and functions properly on all devices.


---

Original Source: https://www.mindstick.com/forum/158302/how-to-include-bootstrap-in-an-html-file

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
