Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile-first projects on the web. In this article we will discuss about basics of bootstrap.
- Bootstrap is a free front-end framework for faster and easier web development
- Bootstrap also gives you the ability to easily create responsive designs
Why use 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)
Some steps that required for making web pages using Bootstrap :
- 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.123456<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"></head></html>
- 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
<meta name="viewport" content="width=device-width, initial-scale=1">
width=device-widthpart sets the width of the page to follow the screen-width of the device (which will vary depending on the device).
initial-scale=1part sets the initial zoom level when the page is first loaded by the browser.
- Bootstrap also requires a containing element to wrap site contents.
- There are two container classes to choose from:
.containerclass provides a responsive fixed width container
.container-fluidclass provides a full width container, spanning the entire width of the viewport
What to read next?