What Is Bootstrap
July 31, 2017
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 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?
1 . Easy to use
2. Responsive Features
3. Browser support
4. Mobile-first approach
5. Browser compatibility
Where to Get Bootstrap?
There are two ways to start using Bootstrap on your own web site.
- Download Bootstrap from getbootstrap.com
- Include Bootstrap from a CDN
If you don’t want to download and host Bootstrap yourself, you can include it from a CDN (Content Delivery Network).
One advantage of using the Bootstrap CDN:
Many users already have downloaded Bootstrap from MaxCDN when visiting another site. As a result, it will be loaded from cache when they visit your site, which leads to faster loading time. Also, most CDN’s will make sure that once a user requests a file from it, it will be served from the server closest to them, which also leads to faster loading time.
Create First Web Page With 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:
- 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:
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.
Bootstrap also requires a containing element to wrap site contents.
There are two container classes to choose from:
- The .container class provides a responsive fixed width container
- 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).
Two Basic Bootstrap Pages
The following example shows the code for a basic Bootstrap page (with a responsive fixed width container):
Bootstrap Grid System
Bootstrap’s grid system allows up to 12 columns across the page.
If you do not want to use all 12 columns individually, you can group the columns together to create wider columns:
Bootstrap’s grid system is responsive, and the columns will re-arrange automatically depending on the screen size
The Bootstrap grid system has four classes:
- xs (for phones)
- sm (for tablets)
- md (for desktops)
- lg (for larger desktops)
The classes above can be combined to create more dynamic and flexible layouts.
I hope above all solutions worked for you, share this post and enjoy your day.