
Domains
Agile Management
Master Agile methodologies for efficient and timely project delivery.
View All Agile Management Coursesicon-refresh-cwCertifications
Scrum Alliance
16 Hours
Best Seller
Certified ScrumMaster (CSM) CertificationScrum Alliance
16 Hours
Best Seller
Certified Scrum Product Owner (CSPO) CertificationScaled Agile
16 Hours
Trending
Leading SAFe 6.0 CertificationScrum.org
16 Hours
Professional Scrum Master (PSM) CertificationScaled Agile
16 Hours
SAFe 6.0 Scrum Master (SSM) CertificationAdvanced Certifications
Scaled Agile, Inc.
32 Hours
Recommended
Implementing SAFe 6.0 (SPC) CertificationScaled Agile, Inc.
24 Hours
SAFe 6.0 Release Train Engineer (RTE) CertificationScaled Agile, Inc.
16 Hours
Trending
SAFe® 6.0 Product Owner/Product Manager (POPM)IC Agile
24 Hours
ICP Agile Certified Coaching (ICP-ACC)Scrum.org
16 Hours
Professional Scrum Product Owner I (PSPO I) TrainingMasters
32 Hours
Trending
Agile Management Master's Program32 Hours
Agile Excellence Master's ProgramOn-Demand Courses
Agile and ScrumRoles
Scrum MasterTech Courses and Bootcamps
Full Stack Developer BootcampAccreditation Bodies
Scrum AllianceTop Resources
Scrum TutorialProject Management
Gain expert skills to lead projects to success and timely completion.
View All Project Management Coursesicon-standCertifications
PMI
36 Hours
Best Seller
Project Management Professional (PMP) CertificationAxelos
32 Hours
PRINCE2 Foundation & Practitioner CertificationAxelos
16 Hours
PRINCE2 Foundation CertificationAxelos
16 Hours
PRINCE2 Practitioner CertificationSkills
Change ManagementMasters
Job Oriented
45 Hours
Trending
Project Management Master's ProgramUniversity Programs
45 Hours
Trending
Project Management Master's ProgramOn-Demand Courses
PRINCE2 Practitioner CourseRoles
Project ManagerAccreditation Bodies
PMITop Resources
Theories of MotivationCloud Computing
Learn to harness the cloud to deliver computing resources efficiently.
View All Cloud Computing Coursesicon-cloud-snowingCertifications
AWS
32 Hours
Best Seller
AWS Certified Solutions Architect - AssociateAWS
32 Hours
AWS Cloud Practitioner CertificationAWS
24 Hours
AWS DevOps CertificationMicrosoft
16 Hours
Azure Fundamentals CertificationMicrosoft
24 Hours
Best Seller
Azure Administrator CertificationMicrosoft
45 Hours
Recommended
Azure Data Engineer CertificationMicrosoft
32 Hours
Azure Solution Architect CertificationMicrosoft
40 Hours
Azure DevOps CertificationAWS
24 Hours
Systems Operations on AWS Certification TrainingAWS
24 Hours
Developing on AWSMasters
Job Oriented
48 Hours
New
AWS Cloud Architect Masters ProgramBootcamps
Career Kickstarter
100 Hours
Trending
Cloud Engineer BootcampRoles
Cloud EngineerOn-Demand Courses
AWS Certified Developer Associate - Complete GuideAuthorized Partners of
AWSTop Resources
Scrum TutorialIT Service Management
Understand how to plan, design, and optimize IT services efficiently.
View All DevOps Coursesicon-git-commitCertifications
Axelos
16 Hours
Best Seller
ITIL 4 Foundation CertificationAxelos
16 Hours
ITIL Practitioner CertificationPeopleCert
16 Hours
ISO 14001 Foundation CertificationPeopleCert
16 Hours
ISO 20000 CertificationPeopleCert
24 Hours
ISO 27000 Foundation CertificationAxelos
24 Hours
ITIL 4 Specialist: Create, Deliver and Support TrainingAxelos
24 Hours
ITIL 4 Specialist: Drive Stakeholder Value TrainingAxelos
16 Hours
ITIL 4 Strategist Direct, Plan and Improve TrainingOn-Demand Courses
ITIL 4 Specialist: Create, Deliver and Support ExamTop Resources
ITIL Practice TestData Science
Unlock valuable insights from data with advanced analytics.
View All Data Science Coursesicon-dataBootcamps
Job Oriented
6 Months
Trending
Data Science BootcampJob Oriented
289 Hours
Data Engineer BootcampJob Oriented
6 Months
Data Analyst BootcampJob Oriented
288 Hours
New
AI Engineer BootcampSkills
Data Science with PythonRoles
Data ScientistOn-Demand Courses
Data Analysis Using ExcelTop Resources
Machine Learning TutorialDevOps
Automate and streamline the delivery of products and services.
View All DevOps Coursesicon-terminal-squareCertifications
DevOps Institute
16 Hours
Best Seller
DevOps Foundation CertificationCNCF
32 Hours
New
Certified Kubernetes AdministratorDevops Institute
16 Hours
Devops LeaderSkills
KubernetesRoles
DevOps EngineerOn-Demand Courses
CI/CD with Jenkins XGlobal Accreditations
DevOps InstituteTop Resources
Top DevOps ProjectsBI And Visualization
Understand how to transform data into actionable, measurable insights.
View All BI And Visualization Coursesicon-microscopeBI and Visualization Tools
Certification
24 Hours
Recommended
Tableau CertificationCertification
24 Hours
Data Visualization with Tableau CertificationMicrosoft
24 Hours
Best Seller
Microsoft Power BI CertificationTIBCO
36 Hours
TIBCO Spotfire TrainingCertification
30 Hours
Data Visualization with QlikView CertificationCertification
16 Hours
Sisense BI CertificationOn-Demand Courses
Data Visualization Using Tableau TrainingTop Resources
Python Data Viz LibsCyber Security
Understand how to protect data and systems from threats or disasters.
View All Cyber Security Coursesicon-refresh-cwCertifications
CompTIA
40 Hours
Best Seller
CompTIA Security+EC-Council
40 Hours
Certified Ethical Hacker (CEH v12) CertificationISACA
22 Hours
Certified Information Systems Auditor (CISA) CertificationISACA
40 Hours
Certified Information Security Manager (CISM) Certification(ISC)²
40 Hours
Certified Information Systems Security Professional (CISSP)(ISC)²
40 Hours
Certified Cloud Security Professional (CCSP) Certification16 Hours
Certified Information Privacy Professional - Europe (CIPP-E) CertificationISACA
16 Hours
COBIT5 Foundation16 Hours
Payment Card Industry Security Standards (PCI-DSS) CertificationOn-Demand Courses
CISSPTop Resources
Laptops for IT SecurityWeb Development
Learn to create user-friendly, fast, and dynamic web applications.
View All Web Development Coursesicon-codeBootcamps
Career Kickstarter
6 Months
Best Seller
Full-Stack Developer BootcampJob Oriented
3 Months
Best Seller
UI/UX Design BootcampEnterprise Recommended
6 Months
Java Full Stack Developer BootcampCareer Kickstarter
490+ Hours
Front-End Development BootcampCareer Accelerator
4 Months
Backend Development Bootcamp (Node JS)Skills
ReactOn-Demand Courses
Angular TrainingTop Resources
Top HTML ProjectsBlockchain
Understand how transactions and databases work in blockchain technology.
View All Blockchain Coursesicon-stop-squareBlockchain Certifications
40 Hours
Blockchain Professional Certification32 Hours
Blockchain Solutions Architect Certification32 Hours
Blockchain Security Engineer Certification24 Hours
Blockchain Quality Engineer Certification5+ Hours
Blockchain 101 CertificationOn-Demand Courses
NFT Essentials 101: A Beginner's GuideTop Resources
Blockchain Interview QsProgramming
Learn to code efficiently and design software that solves problems.
View All Programming Coursesicon-codeSkills
Python CertificationInterview Prep
Career Accelerator
3 Months
Software Engineer Interview PrepOn-Demand Courses
Data Structures and Algorithms with JavaScriptTop Resources
Python TutorialWeb Development
4.6 Rating 120 Questions 55 mins read2 Readers

Bootstrap is an open source framework for developing responsive websites with HTML, JavaScript and CSS. Developed by Twitter in 2011, it is a front-end framework for faster web development. Mark Otto and Jacob Thornton released it on GitHub in August 2011.
Let us see the reasons why we should work with Bootstrap for web development:
Bootstrap is supported by all the modern browsers. Do not worry about compatibility, it is compatible with all the popular web browsers such as Firefox, Chrome, Opera, Safari and Edge.
Bootstrap released on GitHub and is free to use. Go to its official website, download and begin with designing of amazing responsive websites. With that, you can also use CDN to work with Bootstrap.
Bootstrap allows you to develop and design responsive websites. The website designed with Bootstraps works well for all the devices: Mobile, Desktop and Tablet.

Bootstrap has mobile first styles in its library. The same is part of the Bootstrap core framework and its grid system allows the designers to design websites sites for small screens first and then move and scale designs up from there.
The components provided by Bootstrap are compatible and you can easily customize them. Some examples include, button groups, iconography, navbar, input groups, alerts, etc.
Here are some of the icons provided by Bootstrap component iconography:

It’s not a cumbersome task to work with Bootstrap. A basic working knowledge of the three pillars of web development i.e. HTML, JavaScript and CSS is what you need to begin with Bootstrap.
Bootstrap 4 released in August 2017 and with that new features introduced. It is an open source framework like Bootstrap 3 for designing responsive websites with HTML, JavaScript and CSS.
Supporting all major and modern browsers, it has the new feature of flex modal for grid system and even added new components. Bootstrap 4 also removed a lot of features.
Let us now see the differences between Bootstrap 3 and Bootstrap 4:
| Basis | Bootstrap 3 | Bootstrap 4 |
|---|---|---|
| Definition | Bootstrap 3 is an open source framework for designing responsive websites with HTML, JavaScript and CSS. | Bootstrap 4 released in August 2017 and added new features of flex modal for grid system and even added new components |
| Form Label Size | Bootstrap 3 do not have any class for form label size. | Bootstrap 4 came with .col-form-label-sm and .col-form-label-lg to increase or decrease the size of a label and match the size of the relevant form control. |
| Global Font Size | Bootstrap 3 had Global Form Size of 14px. | Bootstrap 4 introduced Global Form Size of 16px. |
| Checkboxes and Radio Buttons | The classes for checkbox and radio buttons are .radio, .radio-inline, .checkbox, or .checkbox-inline. Here inline is for displaying them in a line. | For the same purpose, Bootstrap use .form-check, .form-check-label, .form-check-input, and .form-check-inline. |
| Source CSS file | The source CSS file for Bootstrap 3 is LESS. | The source CSS file for Bootstrap 3 is SCSS. |
| Offset Columns | For offset columns, Bootstrap 3 use col-*-offset-* classes. | For offset columns, Bootstrap 4 use offset-*-* classes. |
| Dark Tables | You cannot add dark tables with Bootstrap 3. | Add dark tables with the .table-dark class in Bootstrap 4 |
| Form Control Size | For increasing or decreasing the input control size, Bootstrap 3 has .input-lg and .input-sm. | For increasing or decreasing the input control size, Bootstrap 4 has .form-control-lg and .form-control-sm classes. |
| Table Head Styles | Classes for table head styles isn’t supported by Bootstrap 3. | Create table head styles with.thead-light and .thead-dark classes. |
| Buttons with Outline | You cannot style Button with outline color in Bootstrap 3. | Bootstrap 4 introduced the .btn-outline-* classes for styling buttons with an outline color. |
| Button Sizes | Classes are available for resize buttons. | Bootstrap 4 only deprecated the .btn-xs class. Rest, .btn-sm and .btn-lg are still available. |
| Responsive Images | To create responsive images with Bootstrap 3, use the .img-responsive class. | To create responsive images with Bootstrap 4, use .img-fluid class. |
| Media Objects | Bootstrap 3 came with a lot of classes for Media Objects, such as .media, .media-body .media-object, .media-heading, etc. | Bootstrap 4 only use .media class. |
| Disabled Menu Items | To disable Menu Items in Bootstrap 3, you need to use the .disabled class. Set the class to the <li> to disable. | To disable Menu Items in Bootstrap 4, you need to use the .disabled class . Set the class to the <a> to disable. |
| Justified ButtonGroups | The .btn-group-justified class is used in Bootstrap 3 to justify button groups. | The .btn-group-justified class is not supported in Bootstrap 4. |
| Extra Small ButtonGroups | Bootstrap 3 supported a class for extra small button groups i.e. .btn-group-xs class. | Bootstrap 4 do not support any class for extra small button groups.. |
| Fixed Navbars (Top or Bottom) | The .navbar-fixed-top and .navbar-fixed-bottom is used in Bootstrap 3 to fix navbars to the top or bottom. | To fix navbars to the top and bottom, Bootstrap 4 introduced .fixed-top and .fixed-bottom classes.. |
| Full-Width Jumbotron | For full-width jumbotrons, the .jumbotron-fluid class is not supported in Bootstrap 3. | Bootstrap 4 came with .jumbotron-fluid class for full-width jumbotrons. |
| Page Header class | The .page-header class introduced with Bootstrap 3. | The .page-header class wasn’t supported in Bootstrap 4. |
| Bootstrap Cards | Cards weren’t introduced in Bootstrap 3. | Bootstrap 4 introduced Cards to replace the functionality provided by panels and wells in Bootstrap 3. |
| Panels | Panel introduced in Bootstrap 3. | Introduction of cards in Bootstrap 4 replaced the functionality provided by Panels. |
| Wells | The concept of Wells wasn’t supported in Bootstrap3. | Bootstrap 4 introduced the concept of Wells. It is a container that adds a rounded border around an element and adds padding and gray background color. |
| Carousel Item | For creating carousel item with Bootstrap 3, use the .item class. | For creating carousel item with Bootstrap 4, use the .carousel-item class. |
Bootstrap is an open source framework for designing responsive websites. Developed by Twitter in 2011, it is popular worldwide for faster web development. Yes, Bootstrap is a front-end framework. While using Bootstrap, you work with HTML, JavaScript and CSS. Mobile-first styles are part of the core framework.
Bootstrap is called a framework since it is the conceptual structure intended to serve as a support or guide for design of responsive websites that expands the structure into something useful. For example, a real-life example is the structure of a building while constructing it.
There has been a lot of debate on whether Bootstrap is a framework or library, but we can consider it as a front-end library. While adding CSS, we include bootstrap.css or bootstrap.min.css. Including a file of the same format itself says that you are adding a framework. These are prewritten and addition of these files makes a new framework. Therefore, Bootstrap is a framework and library in its correct sense.
Expect to come across this popular question in Bootstrap interview questions for freshers.
A Bootstrap package includes reusable components, plugins, jQuery plugins, etc. Bootstrap is an open source framework for designing responsive websites with HTML, JavaScript and CSS. Developed by Twitter in 2011, it is a front-end framework for easier web development.
Let us see what all comes under the Bootstrap package:
jQuery is a JavaScript library. Bootstrap has 12 custom jQuery plugins, such as Modal, Dropdown, Tab, Tooltip, Alert, Collapse, Affix, etc. You can include these plugins individually or all at once and extend more functionalities to the website.
The global CSS settings are part of the Bootstrap packages. It has extendable classes and an enhanced grid system as well.
Bootstrap comes with Grid System, link styles, etc, and all this comes under the Bootstrap package.
Bootstrap has lot of components to add more functionalities to your website. Some examples include navbar, alerts, iconography, navigation, dropdowns, pagination, badges, labels, etc.
Bootstrap allows you to customize components, jQuery plugins etc. Customize them accordingly and work with what you want from the component or plugin.
Use Bootstrap CDN, if you don’t wish to do the cumbersome task of downloading Bootstrap and hosting it on your system or server. CDN is Content Delivery Network, wherein the Bootstrap is hosted and with just the CDN link, we can add it to our website. We will be using MaxCDN to provide CDN support for Bootstrap CSS and JavaScript.
Using CDN will lead to faster loading time since once you have requested a file from it from your website, it will be served from the server closest to them.
Let us now see how we can setup Bootstrap 4 with CDN.
Use the following CDN for CSS and JS. Include it in the <head> tag:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.13/js/bootstrap.min.js"></script>
Now, include jQuery and Popper if you are using the components like tooltips, popovers, etc.
<!-- jQuery library --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <!-- Popper JS --> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
Let us now see a simple example to implement what we saw above. In the below example, we have included .container-fluid class to provide a full width container that spans the entire width of the viewport. We have included the Bootstrap CDN in the <head> tag:
<!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Demo</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script> </head> <body> <div class="container-fluid"> <h1>Demo Page</h1> <p>The .container-fluid class provides a full width container, spanning the entire width of the viewport.</p> </div> </body> </html>
The following is the output after running the above Bootstrap code:

Yes, we can easily create a Progress Bar with different colors using the contextual classes. The following are the contextual classes available for Progress Bar in Bootstrap:
For our example, let us create a green colored Progress Bar:
<div class="progress">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="80"
aria-valuemin="0" aria-valuemax="100" style="width:80%">
<span class="sr-only">80%</span>
</div>
</div>
The above displays the following green colored Progress Bar:
Let us now create multiple Progress Bars with different colors. Here, we are displaying information about an app based on its performance, crashes and errors. For all this information, we have used three Progress Bars:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h1>App Information</h1>
<h2>App Performance</h2>
<div class="progress">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="90"
aria-valuemin="0" aria-valuemax="100" style="width:90%">
90%
</div>
</div>
<h2>App Crashes</h2>
<div class="progress">
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="10"
aria-valuemin="0" aria-valuemax="100" style="width:10%">
10%
</div>
</div>
<h2>App Errors</h2>
<div class="progress">
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="20"
aria-valuemin="0" aria-valuemax="100" style="width:20%">
20%
</div>
</div>
</div>
</body>
</html>
The output displays Progress Bars with different colors:

Form Layout in Bootstrap has the following three forms:
Let us learn about them one by one:
Vertical Form
This is the default form in Bootstrap. Let us see a code snippet to understand it:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Vertical Form in Bootstrap</h2>
<div class="form-group">
<label for="email">UserId (Email):</label>
<input type="email" class="form-control" id="useremail">
</div>
<div class="form-group">
<label for="pwd">Password:</label>
<input type="password" class="form-control" id="pwd">
</div>
</div>
</body>
</html>
The above displays the following vertical form as the output:

Horizonal Form
The form-horizonal class is used in Bootstrap for Horizontal form. The labels are aligned horizontally next to the input field on large and medium screens. However, on small screens i.e. < 767px, it will get converted to a vertical form. The form would then look like labels on top of each input).
Let us see a code to understand it:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Horizontal Form in Bootstrap</h2>
<form class="form-horizontal" action="">
<div class="form-group">
<label class="control-label col-sm-2" for="email">UserId(Email):</label>
<div class="col-sm-10">
<input type="email" class="form-control" id="useremail" placeholder="Enter email">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="pwd">Password:</label>
<div class="col-sm-10">
<input type="password" class="form-control" id="pwd" placeholder="Enter password">
</div>
</div>
</form>
</div>
</body>
</html>
Here is the output when the screen size is below 767 px:

Here is the output when the screen size is above 767 px:

Inline Form
Inline forms are the forms in which the elements are inline and left-aligned. For using it, add class .form-inline to the <form> tag.
Let us see an example:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Inline Form in Bootstrap</h2>
<form class="form-inline" action="">
<div class="form-group">
<label for="email">Email address:</label>
<input type="email" class="form-control" id="email">
</div>
<div class="form-group">
<label for="pwd">Password:</label>
<input type="password" class="form-control" id="pwd">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
</div>
</body>
</html>
Here is the output when the screen size is below 767 px:

Here is the output when the screen size is above 767 px. All the elements are now inline and left-aligned

To set an aligned object with content, use the Media Object. These objects can be image or video. The usage of media objects can be seen in the comment section of a website/ blog.
The .media class and .media-body class is used in Bootstrap to work with media objects. Float a media object using .media class, whereas .media-body class place media content inside a child container.
The following is an example that creates a media object to align image with content:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container mt-3">
<h2>Learn</h2>
<p>Here comes the article content...</p>
<div class="media border p-3">
<img src="https://d2o2utebsixu4k.cloudfront.net/media/images/dfbac927-789d-4780-acdb-0eeceab17a17.jpg" alt="John Doe" class="mr-3 mt-3 rounded-square" style="width:90px;">
<div class="media-body">
<h4>Dev Ops</h4>
<p>This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text!</p>
</div>
</div>
</div>
</body>
</html>
The following is the output that displays an image aligned on the left with content:

If you want to align media object on the top, bottom, or middle position, then you can use the flex. Nested media objects are also feasible in Bootstrap.
With Bootstrap, it’s possible to display flex items horizontally using the .flex-row class.
You need to use the following:
<div class="d-flex flex-row bg-secondary mb-3">
Above, we have used the contextual class “bg-secondary” for background color.
Now, we will work on an example:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container mt-3">
<h1>Student Name</h1>
<div class="d-flex flex-row bg-primary mb-3">
<div class="p-2 bg-danger">Sehral</div>
<div class="p-2 bg-primary">Fara</div>
<div class="p-2 bg-dark">Kelly</div>
<div class="p-2 bg-secondary">Gemma</div>
<div class="p-2 bg-warning">Jessica</div>
<div class="p-2 bg-primary">Lauren</div>
</div>
</div>
</body>
</html>
The above aligns the flex items horizontally:

To display flex items horizontally, use the flex-*-row class in Bootstrap. For difference screens, replace the * in the class name with the following:
For large screen:
flex-lg-row
For medium size screen:
flex-md-row
For small screen:
flex-sm-row
The .nav-justified class is used in Bootstrap to center pills.
The following is an example:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Pills</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h3>Centered Pills</h3>
<p><strong>Note:</strong> Resize the browser window to see the effect. Items look stacked if the screen size if less than 768px</p>
<ul class="nav nav-pills nav-justified">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">AboutUs</a></li>
<li><a href="#">Company</a></li>
</ul>
</div>
</body>
</html>
The output when the screen size is less than 768px. The pills look stacked:

The output when the screen size is more than 768px:

If you want to create a tabbed navigation menu, then use the “nav-tabs” class like this:
<ul class="nav nav-tabs">
Let us now see how we can form a tab based navigation menu:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Tabbed Menu</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<ul class="nav nav-tabs">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">AboutUs</a></li>
<li><a href="#">Company</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
</body>
</html>
The output looks like tabbed navigation menu as shown below. The Home tab is marked as the current page:

Expect to come across this popular question in Bootstrap interview questions for experienced professionals.
With Bootstrap, we can easily stack multiple progress bars. For that, include only a single .progress class and place all the Progress Bars inside it.
For example, firstly adding only a single Progress Bar in the .progress class:
<div class = "progress"> <div class = "progress-bar progress-bar-info" role = "progressbar" aria-valuenow = "20" aria-valuemin = "0" aria-valuemax = "100" style = "width: 20%;"> 20% </div> </div>
Now, add another Progress Bar in the same .progress class:
<div class = "progress"> <div class = "progress-bar progress-bar-success" role = "progressbar" aria-valuenow = "20" aria-valuemin = "0" aria-valuemax = "100" style = "width: 20%;"> 20% </div> <div class = "progress-bar progress-bar-info" role = "progressbar" aria-valuenow = "10" aria-valuemin = "0" aria-valuemax = "100" style = "width: 10%;"> 10% </div> </div>
Let us add more Progress Bars in the same .progress class:
<!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Striped Progress Bar</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> </head> <body> <div class="container"> <h2>Level of monosodium glutamate</h2> <div class = "progress"> <div class = "progress-bar progress-bar-success" role = "progressbar" aria-valuenow = "20" aria-valuemin = "0" aria-valuemax = "100" style = "width: 20%;"> 20% (Success) </div> <div class = "progress-bar progress-bar-info" role = "progressbar" aria-valuenow = "10" aria-valuemin = "0" aria-valuemax = "100" style = "width: 10%;"> 10% (High) </div> <div class = "progress-bar progress-bar-warning" role = "progressbar" aria-valuenow = "35" aria-valuemin = "0" aria-valuemax = "100" style = "width: 35%;"> 35% (Very High - Warning) </div> <div class = "progress-bar progress-bar-danger" role = "progressbar" aria-valuenow = "35" aria-valuemin = "0" aria-valuemax = "100" style = "width: 35%;"> 35% (Danger) </div> </div> </div> </body>
The output displays multiple Progress Bars in a single .progress class:

To align a flex item in the center on small screen using the align-self-sm-center class in Bootstrap. This is how you include the class:
<div class="p-2 border align-self-sm-center"> Flex item name </div>
Display flex items vertically with reversed order on large screen using the flex-lg-column-reverse class in Bootstrap.
To add badges to List Groups in Bootstrap, you need to add the following in <li class = "list-group-item">:
<span class = "badge">
Let us now add:
<ul class = "list-group">
<li class = "list-group-item"><span class = "badge">New</span>One</li>
<li class = "list-group-item"><span class = "badge">New</span>Two</li>
<li class = "list-group-item"><span class = "badge">New</span>Three</li>
<li class = "list-group-item"><span class = "badge">New</span>Four</li>
<li class = "list-group-item"><span class = "badge">New</span>Five</li>
</ul>
The following is an example:
<!DOCTYPE html>
<html>
<head>
<title>Try v1.2 Bootstrap Online</title>
<link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<script src="/scripts/jquery.min.js"></script>
<script src="/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Add Badges to List Groups</h2>
<ul class = "list-group">
<li class = "list-group-item"><span class = "badge">New</span>One</li>
<li class = "list-group-item"><span class = "badge">New</span>Two</li>
<li class = "list-group-item"><span class = "badge">New</span>Three</li>
<li class = "list-group-item"><span class = "badge">New</span>Four</li>
<li class = "list-group-item"><span class = "badge">New</span>Five</li>
</ul>
</div>
</body>
</html>
The output: