WHAT I CAN STUDY TODAY
Hand Picking From Database For Specially You... :)

Bootstrap Case: My First Bootstrap Website Tags

 


Build a Bootstrap Web Page From Scratch

The following pages will show how to build a Bootstrap website from scratch.
We will start with a simple HTML page, and then add more and more components, until we have a fully functional and responsive website.
We will start with the following HTML page:
<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Case</title>
  <meta charset="utf-8">
</head>

<body>
  <h1>My first Bootstrap website!</h1> 
  <p>This page will grow as we add more and more components from Bootstrap...</p> 
  <p>This is a paragraph.</p> 
  <p>This is another paragraph.</p> 
  <p>This is a paragraph.</p> 
  <p>This is another paragraph.</p>
</body>
</html>

Add Bootstrap CDN and Put Elements in Containers

The first thing we will do is to add the Bootstrap CDN and a link to jQuery.
Next, we put all the HTML elements in the <body> element inside a container (<div class="container">):

Example

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Case</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet"href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head>
<body>

<div class="container">
  <h1>My first Bootstrap website!</h1> 
  <p>This page will grow as we add more and more components from Bootstrap...</p> 
  <p>This is another paragraph.</p> 
  <p>This is a paragraph.</p> 
  <p>This is another paragraph.</p>
</div>

</body>
</html>
Try it Yourself »
Tip: To let the page fill the whole screen, change .container to .container-fluid:

Example

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Case</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet"href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</head>
<body>

<div class="container-fluid">
  <h1>My first Bootstrap website!</h1> 
  <p>This page will grow as we add more and more components from Bootstrap...</p> 
  <p>This is another paragraph.</p> 
  <p>This is a paragraph.</p> 
  <p>This is another paragraph.</p>
</div>

</body>
</html>
Try it Yourself »


0 Comments:

Post a Comment

WP Engine Managed WordPress Hosting