FB Youtube Twitter

What is Bootstrap?

  • Bootstrap is a free front-end framework for faster and easier web development
  • Bootstrap includes HTML and CSS based design templates for typography, forms, buttons, tables, navigation, modals, image carousels and many other, as well as optional JavaScript plugins
  • Bootstrap also gives you the ability to easily create responsive designs

What is Responsive Web Design?

Responsive web design is about creating web sites which automatically adjust themselves to look good on all devices, from small phones to large desktops.


Bootstrap History

Bootstrap was developed by Mark Otto and Jacob Thornton at Twitter, and released as an open source product in August 2011 on GitHub.

In June 2014 Bootstrap was the No.1 project on GitHub!


Why Use Bootstrap?

Advantages of Bootstrap:

  • Easy to use: Anybody with just basic knowledge of HTML and CSS can start using Bootstrap
  • Responsive features: Bootstrap’s responsive CSS adjusts to phones, tablets, and desktops
  • Mobile-first approach: In Bootstrap 3, mobile-first styles are part of the core framework
  • Browser compatibility: Bootstrap is compatible with all modern browsers (Chrome, Firefox, Internet Explorer, Edge, Safari, and Opera)

Where to Get Bootstrap?

There are two ways to start using Bootstrap on your own web site.

You can:

  • Download Bootstrap from getbootstrap.com
  • Include Bootstrap from a CDN

Downloading Bootstrap

If you want to download and host Bootstrap yourself, go to getbootstrap.com, and follow the instructions there.

If you don’t want to download and host Bootstrap yourself, you can include it from a CDN (Content Delivery Network).

MaxCDN provides CDN support for Bootstrap’s CSS and JavaScript. You must also include jQuery:

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

<!– jQuery library –>
<script src=“https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js”></script>

<!– Latest compiled JavaScript –>
<script src=“https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js”></script>

Create First Web Page With Bootstrap

1. Add the HTML5 doctype

Bootstrap uses HTML elements and CSS properties that require the HTML5 doctype.

Always include the HTML5 doctype at the beginning of the page, along with the lang attribute and the correct character set:

<!DOCTYPE html>
<htmllang="en">
  <head>
    <meta charset="utf-8"> 
  </head>
</html>

 

2. Bootstrap 3 is mobile-first

Bootstrap 3 is designed to be responsive to mobile devices. Mobile-first styles are part of the core framework.

To ensure proper rendering and touch zooming, add the following<meta>tag inside the<head>element:

<meta name="viewport" content="width=device-width, initial-scale=1">

The width=device-width part sets the width of the page to follow the screen-width of the device (which will vary depending on the device).

The initial-scale=1 part sets the initial zoom level when the page is first loaded by the browser.

3. Containers

Bootstrap also requires a containing element to wrap site contents.

There are two container classes to choose from:

  1. The .container class provides a responsive fixed width container
  2. The .container-fluid class provides a full width container, spanning the entire width of the viewport

Ashraf Ali S

Two Basic Bootstrap Pages

The following example shows the code for a basic Bootstrap page (with a responsive fixed width container):

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

<div class=“container”>

<h1>My First Bootstrap Page</h1>

<p>This is some text.</p>

</div>

</body>

</html>

 

Ashraf Ali S

The following example shows the code for a basic Bootstrap page (with a full width container):

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

<div class=“container-fluid”>

<h1>My First Bootstrap Page</h1>

<p>This is some text.</p>

</div>
</body>
</html>

Ashraf Ali S

Categories: Bootstrap

5 Comments

Chethan · 4th September 2018 at 8:03 pm

Ther are some vareing sizes for images what to do there

    AshrafAliS · 5th September 2018 at 12:11 pm

    You Can inline image tag with Height n width attributes
    If u wanna have responsive then use the % not px

BotLike · 5th November 2018 at 9:45 am

auto liker, Autoliker, auto like, Autoliker Facebook, Fb Autoliker, Photo Auto Liker, Facebook Auto Liker, Auto Liker, autoliker, Working Auto Liker, Photo Liker, Increase Facebook Likes, Facebook Autoliker, Facebook Liker, Auto Like, Status Auto Liker, Status Liker, facebook auto liker, autolike, Autoliker

ergfirnolikz · 10th January 2019 at 6:58 am

Greetings! I’ve been reading your weblog for a long time now and finally got the courage to go ahead and give you a shout out from Huffman Tx! Just wanted to tell you keep up the excellent work!

ergfir nolikz · 10th January 2019 at 4:26 pm

I don’t even know how I ended up here, but I thought this publish was great. I don’t recognise who you might be however certainly you are going to a well-known blogger if you aren’t already 😉 Cheers!

Leave a Reply

Your e-mail address will not be published. Required fields are marked *