Bootstrap 5 Report
Bootstrap 5 Report
Bootstrap 5 Report
BOOTSTRAP
1. Bootstrap
✓ What is Bootstrap
✓ Why to use Bootstrap (History)
✓ Difference between bootstrap 3, 4, and 5
✓ Bootstrap Properties
What is a
Bootstrap?
▪ Bootstrap is a free front-end framework for faster and easier web development
▪ 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
▪ Bootstrap also gives you the ability to easily create responsive designs
https://www.w3schools.com/bootstrap5/bootstrap_get_started.php
Where to Get Bootstrap?
There are two ways to start using Bootstrap on your own web site.
1. Download Bootstrap from getbootstrap.com
(https://getbootstrap.com/)
2. Include Bootstrap from a CDN(Content Delivery Network).
https://www.w3schools.com/bootstrap5/bootstrap_get_started.php
Difference between Bootstrap 3, 4 and 5
The main differences between Bootstrap 5 and Bootstrap 3 & 4, is that Bootstrap 5 has switched
to JavaScript instead of jQuery.
https://tutorial.techaltum.com/bootstrap.html
Bootstrap 5
Bootstrap 5 (released 2021) is the newest version of Bootstrap (released 2013); with new components,
faster stylesheet and more responsiveness.
Bootstrap 5 supports the latest, stable releases of all major browsers and platforms. However, Internet
Explorer 11 and down is not supported.
Note :
Bootstrap 3 and Bootstrap 4 is still supported for critical bugfixes and documentation
changes, and it is perfectly safe to continue to use them. However, new features will
NOT be added to them.
https://www.w3schools.com/bootstrap5/bootstrap_get_started.php
Create First Web Page With Bootstrap 5
1. Add the HTML5 doctype
Bootstrap 5 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 title and character set:
https://www.w3schools.com/bootstrap5/bootstrap_get_started.php
Create First Web Page With Bootstrap 5
2. Bootstrap 5 is mobile-first
Bootstrap 5 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.
https://www.w3schools.com/bootstrap5/bootstrap_get_started.php
Let’s start!
Bootstrap5
Bootstrap 5 Containers
Containers are used to pad the content inside of them, and there are two container classes available:
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
Container Padding
By default, containers have left and right padding, with no top or bottom padding. Therefore, we
often use spacing utilities, such as extra padding and margins to make them look even better. For
example, .pt-5 means "add a large top padding":
https://www.w3schools.com/bootstrap5/bootstrap_containers.php
Bootstrap 5 Containers
Responsive Containers
You can also use the .container-sm|md|lg|xl classes to create responsive containers.
The max-width of the container will change on different screen sizes/viewports:
https://www.w3schools.com/bootstrap5/bootstrap_containers.php
Bootstrap 5 Grid System
Bootstrap's grid system is built with flexbox and 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:
Note:
The grid system is responsive, and the columns will re-arrange automatically depending on the screen size.
Make sure that the sum adds up to 12 or fewer (it is not required that you use all 12 available columns).
https://www.w3schools.com/bootstrap5/bootstrap_grid_basic.php
Grid Classes
The Bootstrap 5 grid system has six classes: (The classes above can be combined to create more
dynamic and flexible layouts)
https://www.w3schools.com/bootstrap4/bootstrap_grid_basic.asp
Bootstrap 5 Tables
A basic Bootstrap 5 table has a light padding and horizontal dividers.
https://www.w3schools.com/bootstrap5/bootstrap_tables.php
Table Contextual Classes
Contextual classes can be used to color the whole table (<table>), the table rows (<tr>) or table cells (<td>).
https://www.w3schools.com/bootstrap5/bootstrap_tables.php
Bootstrap 5 Alerts
Bootstrap 5 provides an easy way to create predefined alert messages.
Alerts are created with the .alert class, followed by one of the contextual classes
(.alert-success, .alert-info, .alert-warning, .alert-danger, .alert-primary, .alert-secondary, .alert-light or .alert-dark:)
Alert Links
Add the alert-link class to any links inside the alert box to create "matching colored links":
Closing Alerts
To close the alert message, add a .alert-dismissible class to the alert container. Then in a button or
link element add class="btn-close" and data-bs-dismiss="alert" (when you click on this the alert box
will disappear).
https://www.w3schools.com/bootstrap5/bootstrap_alerts.php
Advance Lesson :
1. JavaScript