# Adding bootstrap to html , css

**URL:** <https://forum.freecodecamp.org/t/adding-bootstrap-to-html-css/101422>\
**Category:** Curriculum Help\
**Tags:** css, html\
**Created:** [March 30, 2017, 10:12am UTC](https://forum.freecodecamp.org/t/adding-bootstrap-to-html-css/101422 "2017-03-30T10:12:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![M-Areeb](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/m-areeb/32/66013_2.png) [@M-Areeb](https://forum.freecodecamp.org/u/M-Areeb)\
**Post date:** [March 30, 2017, 10:12am UTC](https://forum.freecodecamp.org/t/adding-bootstrap-to-html-css/101422/1 "2017-03-30T10:12:17Z")

</div>

Hello everyone .  
I want to use bootstrap properties in my html file .How shall i add it to my file .When i went to bootstrap documentation i found that there is option for download .I am in confusion as this is not being taught in front end curriculum .Any way i need advise on it .

---

<div class="post-metadata">

**Author:** ![honmanyau](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/honmanyau/32/45787_2.png) [@honmanyau](https://forum.freecodecamp.org/u/honmanyau)\
**Post date:** [March 30, 2017, 10:28am UTC](https://forum.freecodecamp.org/t/adding-bootstrap-to-html-css/101422/2 "2017-03-30T10:28:39Z")

</div>

It is actually explicitly stated in the first Bootstrap challenge that:

> You can add Bootstrap to any app by adding the following code to the top of your HTML:

> `<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>`

Once you have added to a project you can simply use what is described in the Bootstrap documentation by adding the correct classes to an element to get the desired styling. For example, adding the Bootstrap `text-center` class to an element will center its content.

```
<div class="container-fluid">
    <div class="row>
        <div class="col text-center">
            <!-- Text entered here will be centered with respect to this column -->
        </div>
    </div>
</div>

```

Please note that there are major differences between Bootstrap 3 and Bootstrap 4, if you are using CodePen the default version added is 4.0.0 alpha.

I highly recommend reading the Grid System section of the documentation ([3.3.7](http://getbootstrap.com/css/), [4.0.0 alpha](https://v4-alpha.getbootstrap.com/lay%E2%80%A6)) before you dive into it—that will save you a lot of trouble later on.

I hope that helps! 🙂

**EDIT** : Added code example.

---

<div class="post-metadata">

**Author:** ![kymburley](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/kymburley/32/42946_2.png) [@kymburley](https://forum.freecodecamp.org/u/kymburley)\
**Post date:** [March 30, 2017, 10:29am UTC](https://forum.freecodecamp.org/t/adding-bootstrap-to-html-css/101422/3 "2017-03-30T10:29:22Z")

</div>

I follow [this page](https://v4-alpha.getbootstrap.com/getting-started/introduction/#quick-start).

---

<div class="post-metadata">

**Author:** ![djebar-fermas](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/djebar-fermas/32/45600_2.png) [@djebar-fermas](https://forum.freecodecamp.org/u/djebar-fermas)\
**Post date:** [March 30, 2017, 10:41am UTC](https://forum.freecodecamp.org/t/adding-bootstrap-to-html-css/101422/4 "2017-03-30T10:41:35Z")

</div>

Hello.  
You need to :

- add a \*\*link\*\* to the \*\*bootstrap.min.css\*\* in the `` section of your HTML file
- add a \*\*link\*\* to the \*\*bootstrap.min.js\*\* in the end of the ``, just before the closing tag (``)

Please visit [Bootstrap CDN](http://getbootstrap.com/getting-started/#download) for more details.

---

<div class="post-metadata">

**Author:** ![M-Areeb](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/m-areeb/32/66013_2.png) [@M-Areeb](https://forum.freecodecamp.org/u/M-Areeb)\
**Post date:** [March 30, 2017, 10:57am UTC](https://forum.freecodecamp.org/t/adding-bootstrap-to-html-css/101422/5 "2017-03-30T10:57:40Z")

</div>

Thanks for your good explanation.

---

<div class="post-metadata">

**Author:** ![MarkBryan](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/markbryan/32/45958_2.png) [@MarkBryan](https://forum.freecodecamp.org/u/MarkBryan)\
**Post date:** [March 30, 2017, 11:03am UTC](https://forum.freecodecamp.org/t/adding-bootstrap-to-html-css/101422/6 "2017-03-30T11:03:55Z")

</div>

Hi M-Areeb,

Sorry my other message did not show up properly. This is my first post 😁

You can add Bootstrap in your html file by linking the CSS in your html file in two ways:

**1) Link the Bootstrap in your html using CDN or Content Delivery Network:**

- You can do this method by adding the following inside your `<head> </head>` element:

> `<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">`

- This method was in this [challenge](https://www.freecodecamp.com/challenges/use-responsive-design-with-bootstrap-fluid-containers).

**2) Link the Bootstrap in your html using the CSS file you downloaded from Bootstrap.**

- You can do this method by adding the following inside the `<head> </head>` element:

> `<link rel="stylesheet" href="Path">`

- where **Path** is the location you put all your CSS files or the bootstrap CSS file you downloaded from Bootstrap site.

- For example, if you put the “ **bootstrap.css** ” in the same folder as your html, you add this in the `<head> </head>` element of your html:

> `<link rel="stylesheet" href="bootstrap.css">`

I hope that helps.

---

<div class="post-metadata">

**Author:** ![deb1](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/deb1/32/134090_2.png) [@deb1](https://forum.freecodecamp.org/u/deb1)\
**Post date:** [June 14, 2020, 7:51am UTC](https://forum.freecodecamp.org/t/adding-bootstrap-to-html-css/101422/7 "2020-06-14T07:51:36Z")

</div>

so tell me if am correct or wrong . so if i want to do the bootstrap then will there be two separate files . one html file and one bootstrap file and then after finishing  
the file link the bootstrap to html file like how you do in CSS file . am i correct ? if not please explain .

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [February 6, 2021, 9:16pm UTC](https://forum.freecodecamp.org/t/adding-bootstrap-to-html-css/101422/8 "2021-02-06T21:16:21Z")

</div>

Closed on February 6, 2021, 9:16pm UTC


