What is Bootstrap?


Bootstrap

  1. Bootstrap is a free front-end framework for faster and easier web development.
  2. 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.
  3. Bootstrap also gives you the ability to easily create responsive designs.

Responsive Website:

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

Advantage's 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, Safari, and Opera).

Download Bootstrap

you can download Bootstrap file from official website http://getbootstrap.com/DownloadFile

Create Sample Web Page with Bootstrap :

Add HTML

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:

<html lang="en">
  <head>
    <meta charset="utf-8"> 
  </head>
</html>

Bootstrap 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 tag inside the 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.

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

Note : Containers are not nestable (you cannot put a container inside another container).

Sample Bootstrap WebPage's

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="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/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>

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="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/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>
Tag : bootstrap
0 Komentar untuk "What is Bootstrap?"

Back To Top