Understanding code made easy

Post Top Ad

Your Ad Spot

Friday, June 5, 2020

Getting started with Bootstrap 4


Bootstrap basics:

Bootstrap 4 is the newest version of Bootstrap, which is the most popular HTML, CSS & JavaScript framework for developing responsive, mobile-first websites.
Bootstrap 4 is completely free to download and use!

What is 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.

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.


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


How to Get Bootstrap 4?
There are two ways to start using Bootstrap 4 on your own web site:
1. You can include Bootstrap 4 from a CDN
2. You can download Bootstrap 4 from getbootstrap.com

1. Downloading Bootstrap 4:
If you want to download and host Bootstrap 4 yourself, go to https://getbootstrap.com/, and follow the instructions.

2. Bootstrap 4 CDN:
If you don't want to download and host Bootstrap 4 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/4.5.0/css/bootstrap.min.css">

<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

<!-- Popper JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>

<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>

Advantage of using the Bootstrap 4 CDN:
Many users already have downloaded Bootstrap 4 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.

jQuery and Popper?
Bootstrap 4 use jQuery and Popper.js for JavaScript components (like modals, tooltips, popovers etc). However, if you just use the CSS part of Bootstrap, you don't need them.

Conclusion:
Recent Web developers very much use Bootstrap for building their websites & Web applications. It is very much useful to make a responsive & a feel-good website using the Bootstrap framework.

Happy Learning!



No comments:

Post a Comment

Comments