You are currently viewing How to Link Bootstrap to an HTML page

How to Link Bootstrap to an HTML page

Link Bootstrap to HTML

To link Bootstrap to an HTML page first we need to paste the downloaded Bootstrap and jQuery folders to the root folder of the created website. Next, we need to link the necessary CSS and JavaScript files to an HTML page.

Linking code:

<!DOCTYPE html>
<html>
<head>
   <meta charset="utf-8">
   <title>HTML demo</title>
   <meta name="viewport" content="width=device-width, initial-scal=1">
   <link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css">
</head>
<body>
   <script src="jquery/jquery.min.js" type="text/javascript"></script>
   <script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
</body>
</html>

In the above HTML code, we linked successfully bootstrap using <link> and <script> tags.

First, you can use the “href” attribute in the <link> tag and give your bootstrap file path as the value like as in the code above.

Then use <script> tag “src” attribute and give your bootstrap file path as the value

Leave a Reply