0

I have followed the tutorials on codeacademy and I am experimenting with getting to grips writing code for a website without tutorial guidance.

I'm not sure how to reference to Bootstrap other than the way that is given on the online tutorials which is using this:

<link rel="stylesheet" href="http://s3.amazonaws.com/codecademy-content/courses/ltp/css/bootstrap.css">

Do you reference Bootstrap from your own computer after downloading the files? Or do you reference an online source such as the one above?

Knut Holm
  • 3,988
  • 4
  • 32
  • 54
Danny Mallon
  • 1
  • 2
  • 3
  • You can use [CDN](http://www.bootstrapcdn.com/) for bootstrap or you can add files in your folder and link it. – anpsmn Feb 18 '15 at 13:45

3 Answers3

3

Embedding Bootstrap can be done in two ways. You can either host a copy on your own server or use a copy from a CDN. Both ways have their advantages and disadvantages. It's up to you which way you prefer.

Local copy

<link rel="stylesheet" href="path/bootstrap.min.css"/>

CDN

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>

The Gettings started page will explain it in more detail.

Berendschot
  • 3,026
  • 1
  • 21
  • 43
0

BootstrapCDN.com

Hosts the Javascript, CSS, and Image files. Also has SSL support.

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>

This question is already answered here: Is there a hosted version of Twitter Bootstrap?

Community
  • 1
  • 1
mgamon
  • 308
  • 7
  • 16
0

Danny, if you downloaded the files, you don't need to refer it. You can just call the file in the page. or other solution is , you don't need to download files, you can refer Bootstrap CDN link from this page http://getbootstrap.com/getting-started/

cheers!