Easy learning with example program codes

Steps To Create First Web Page With Bootstrap

Add the HTML5 doctype:

Bootstrap uses HTML elements and CSS properties that require the HTML5 doctype. So we have to include the HTML5 doctype at the beginning of the page, along with the lang attribute and the correct character set.

<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8"> 

Bootstrap 3 is mobile-first:

As we discussed in previous tutorial, Bootstrap 3 provides mobile-first styles as a part of the core framework. So we have to add the following tag inside the element for proper rendering and touch zooming.

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

width=device-width: It is used to set the width of the page to follow the screen-width of the device. Screen-width will vary depending on the device.
initial-scale=1: It is used to set the initial zoom level when the page is first loaded by the browser.


Bootstrap containers are used to wrap the site contents.

Bootstrap container classes:
.container class: It provides a responsive fixed width container.
.container-fluid class: It provides a full width container, spanning the entire width of the view port.

Note: Bootstrap Containers are not nestable i.e. we cannot put a container inside another container.

Bootstrap Example:

<!DOCTYPE html>  
<html lang="en">  
  <title>Bootstrap Example</title>      
  <meta name="viewport" content="width=device-width, initial-scale=1">  
  <link rel="stylesheet" href="">  
<div class="container">  
  <h1>First Web Page With Bootstrap</h1>  
  <p>Web page content.</p>   
  <script src=""></script>  
  <script src=""></script>  
Try it:

Bootstrap Example on

Bootstrap 3 Tutorial

Bootstrap package tutorial.
Bootstrap CDN link tutorial.
Create First Web Page With Bootstrap.
Bootstrap Grid System tutorial.
Bootstrap grid equal columns example.
Bootstrap grid unequal columns example.
Bootstrap Jumbotron tutorial.
Bootstrap Page Header Tutorial.
Bootstrap Well tutorial.
Bootstrap Alert Tutorial.
Bootstrap Alert Link Tutorial.
Bootstrap Closing Alerts tutorial.
Bootstrap Animated Alerts Tutorial.
Bootstrap Buttons Style Tutorial.
Bootstrap Buttons Size Tutorial.
Bootstrap Block Level Buttons tutorial.
Bootstrap Buttons States Tutorial.
Bootstrap Button Groups Tutorial.
Bootstrap Vertical Button Groups tutorial.
Bootstrap Justified Button Groups Tutorial.
Bootstrap Nesting Button Groups Tutorial.
Bootstrap Split Button Dropdowns tutorial.
Bootstrap Badges Tutorial.
Bootstrap Contextual Badges Tutorial.
Bootstrap Pill Badges tutorial.
Bootstrap Labels Tutorial.
Bootstrap Contextual Labels Tutorial.
Bootstrap Basic Progress Bar tutorial.
Bootstrap Progress Bar With Label Tutorial.
Bootstrap Colored Progress Bars Tutorial.
Bootstrap Striped Progress Bars Tutorial.
Bootstrap Animated Progress Bars tutorial.
Bootstrap Stacked Progress Bars Tutorial.
Bootstrap Pagination Tutorial.
Bootstrap Pagination – Active State.
Bootstrap Pagination – Disabled State.
Bootstrap Pagination – Sizing Tutorial.
Bootstrap Pagination Breadcrumbs Tutorial.
Bootstrap Pager Tutorial.
Bootstrap Align Buttons tutorial.
Bootstrap Basic List Group Tutorial.
Bootstrap List Group With Badges Tutorial.
Bootstrap List Group With Linked Items.
Bootstrap Active Item in a List Group.
Bootstrap Disabled Item in a List Group.
Bootstrap Group Contextual Classes.
Bootstrap Basic Panel Tutorial.
Bootstrap Panel Heading tutorial.
Bootstrap Panel Footer Tutorial.
Bootstrap Panel Group Tutorial.
Bootstrap Panels with Contextual Classes.
Bootstrap Glyphicon Tutorial.
Bootstrap Dropdowns Tutorial.
Bootstrap Dropdowns Divider tutorial.
Bootstrap Dropdowns Header Tutorial.
Bootstrap Dropdowns Active items.
Bootstrap Dropdowns Disable items.
Bootstrap Dropdowns Position Tutorial.
Bootstrap Dropup Tutorial.
Bootstrap Simple Collapsible items.
Bootstrap Collapsible Panel Tutorial.
Bootstrap Collapsible List Group.
Bootstrap Vertical Form items.
Bootstrap Inline Form.
Bootstrap Horizontal Form.

Copyright © 2019 CodesJava Protection Status SiteMap Reference: Java Wiki