Bootstrap has become one of the most popular front-end frameworks for building responsive and visually appealing web applications. It provides a collection of tools and components for creating user-friendly and interactive interfaces, helping developers build websites quickly and efficiently.
In this article, we’ve compiled the Top 50+ Bootstrap Interview Questions and Answers 2025, covering essential and advanced Bootstrap concepts. Whether you’re a beginner or an experienced developer with 3-5 years of hands-on experience, these questions will help you confidently prepare for your Bootstrap-related interviews.
Bootstrap Interview Questions - Beginners
1. What is Bootstrap?
Bootstrap is a free and open-source tool collection used for creating responsive websites and web applications. It is the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites. Bootstrap is used for creating tables, forms, buttons, carousels, navigation bars, and images.
2. What are the features of Bootstrap?
Bootstrap's features are
- It is open-source and free to use.
- All browsers are compatible with Bootstrap.
- Its designs are responsive.
- Quick and simple to use.
3. How many different layouts does Bootstrap have?
Bootstrap has 2 major layouts
- Fluid: This layout is required for generating a 100 percent broader app that spans the entire screen width.
- Fixed: It is only used for a normal display. Both of these layouts can be combined to make a responsive design.
4. Give an example of a basic grid structure in Bootstrap.
Basic grid structure
HTML
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap Grid Example</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-4 bg-primary text-white text-center p-3">Column 1</div>
<div class="col-md-4 bg-success text-white text-center p-3">Column 2</div>
<div class="col-md-4 bg-warning text-dark text-center p-3">Column 3</div>
</div>
</div>
</body>
Basic Grid Structure5. What is a Bootstrap progress bar?
A progress bar is used to display the progress of a process on a computer. It displays the range of completion of progress. The progress bar can be added to a web page using inbuilt bootstrap classes. Bootstrap has many types of progress bars. For Ex: .bg-success, .bg-info, bg-warning etc.
When compared to other web development platforms, Bootstrap provides more functionalities. It has significant browser support for practically all popular browsers, like Chrome, Firefox, Safari, etc. Web creation with Bootstrap is simple if you are familiar with CSS and HTML.
7. What is the difference between Bootstrap and Foundation?
Feature | Bootstrap | Foundation |
---|
Developer | Developed by Twitter | Developed by ZURB |
---|
Popularity | Most widely used CSS framework | Less popular compared to Bootstrap but still widely used |
---|
Responsive Design | Built-in responsive utilities and breakpoints | Provides flexible grid and media queries |
---|
Performance | Can be heavy due to the number of components included | Typically lighter and more modular than Bootstrap |
---|
Browser Support | Supports modern browsers and IE 10+ | Supports modern browsers and IE 11+ |
---|
8. What are collapsing elements in Bootstrap?
When the user clicks or hovers over the element then it shows data called Collapsing Element. This is the modern way to show a large amount of data to the user. We can also create our own collapsing element by using HTML, CSS, and JS. It makes the website very clean by collapsing the data while hovering or clicking on it. But Bootstrap facilitates the collapsing element property in its components. Bootstrap facilitates the collapsing element property
9. Suggests the lists that Bootstrap supports.
There are 3 types of lists supported by Bootstrap are:
- Unordered Lists: In Unordered lists, items are marked with bullets.
- Ordered Lists: In Ordered lists items are marked with numerical bullets such as 1,2, i, ii, etc.
- Definition Lists: In Definition lists, items are defined with their description.
10. What is a bootstrap card and how to create it?
In Boostrap 5, the card is the bordered box which contains the padding around the content.
Structure of a Bootrap Card
- .card: The main container.
- .card-header(Optional): The header section of the card.
- .card-body: The main content area where text, images, and buttons go.
- .card-footer(Optional): Footer section.
Now, let us understand with the help of the example:
HTML
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<style>
body {
background-color: #f4f6f7; /* Light background */
}
.profile-card {
width: 300px;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.profile-img {
width: 100%;
height: 250px;
object-fit: cover;
}
.card-body {
background-color: #e3f2fd; /* Light blue background */
}
</style>
</head>
<body>
<div class="container d-flex justify-content-center align-items-center vh-100">
<div class="card profile-card text-center">
<img src="image.png/images.jfif" class="profile-img" alt="Profile Image">
<div class="card-body">
<h5 class="card-title">Anjali Sharma</h5>
<p class="card-text">Software Engineer</p>
<a href="#" class="btn btn-primary">See Profile</a>
</div>
</div>
</div>
</body>
Output:
Bootstrap CardBootstrap media objects such as images or videos can be easily and efficiently aligned to the left or right of some content. Bootstrap media objects are used to place some data next to content to create complex and repetitive content components.
The media object classes available are:
12. Why is Jumbotron used in Bootstrap and what steps to add jumbotron?
A jumbotron is a big grey box used to indicate some text which requires extra attention. Any text that seems to be important can be written inside a jumbotron to make it appear big and noticeable.
Steps to add a jumbotron
- Use a jumbotron class inside a div element.
- Write any text inside the div tag.
- Close the div element.
13. Explain the uses of the carousel plugin in Bootstrap.
Carousel is the slideshow component of bootstrap that is widely used for slideshow or cycling through different elements of an HTML document especially image containers or texts. The major use of the carousel plugin is to implement a slider or a slideshow of images. The HTML div containing images can also contain text.
14. How can you make responsive images?
By adding the class .img-responsive to the <img> tag in Bootstrap, images may be made responsive. This class gives the picture max-width: 100%; and height: auto; so that it scales well with the parent element.
15. How can you create a navbar in Bootstrap?
Bootstrap Navbar is a navigation header that is located at the top of the webpage and can be extended or collapsed, depending on the screen size. Responsive navigation of our website is created by the bootstrap navbar.We can create a standard navigation bar with <nav class=” navbar navbar-default”>.
Navbar variations
- navbars with drop-down menus
- search boxes
- a fixed navbar with minimal effort.
16. What is a Bootstrap Container?
Bootstrap Containers are the most basic layout element and are very essential for basic building blocks of bootstrap that wrap a page’s content. By using container we can align content according to the viewport or given device. We can define container within the container class (.container). In other words, we can also say that containers are established the width for the layout to give the content. All the elements and content are added within the container.
17. What is Grid System in Bootstrap?
Bootstrap Grid System divides up to 12 columns across the page. You can use each of them individually or also can be merge together for wider columns. You can use 12 columns each of width 1 or use 4 columns each of width 3 or any other combination.
18. What are the key components of Bootstrap?
- CSS: It is made up of several CSS files.
- Scaffolding: It gives a basic framework with a grid system, link styles, and backdrop.
- Layout Components: This displays a list of layout elements.
- JavaScript Plugins: Many jQuery and JavaScript plugins are included.
- Customization: You can customize your components to create your own version of the framework.
19. What are glyphicons? How to use them?
Icon fonts which can be used in web application are called Glyphicons. Bootstrap includes 260 glyphicons. These glyphicons are used for web projects from Bootstrap Glyphicons Halflings Set. Glyphicons Halflings are not available to free of cost, but their creator has made them available for Bootstrap free of cost.
For using the Glyphicons icon in Bootstrap, you can add the following code just about anywhere in your code. We can also leave a space for proper padding in between the icon and text:
<span class = "glyphicon glyphicon-search"></span>
Forms are the most important and basic template of the website which is used for creating table, signup, login and feedback etc. Thus the availability of form templates in bootstrap has made it easy and we can directly use form templates from bootstrap.
- Step 1: Include the Bootstrap CDN links in the code in order to use Bootstrap.
- Step 2: Now you can use bootstrap forms with the input fields whatever you want in the forms inside the body tag.
21. What is the difference between .container and .container-fluid in Bootstrap?
- .container: Fixed-width container that adapts based on the screen size.
- .container-fluid: Full-width container that spans 100% of the screen width.
Input Groups in Bootstrap are used to extend the default form controls by adding text or buttons on either side of textual inputs, custom file selectors, or custom inputs.
Basic input groups: The following classes are the base classes that are used to add the groups to either side of the input boxes.
- The .input-group-prepend class is used to add groups to the front of the input.
- The .input-group-append class is used to add it behind the input.
- The .input-group-text class is used to style the text that is displayed inside the group.
23. What is Bootstrap breadcrumb?
Bootstrap 5 is the latest major release by Bootstrap in which they have revamped the UI and made various changes. Breadcrumbs are used to indicate the current page’s location within a navigational hierarchy.
<ol class="breadcrumb">
<li class="breadcrumb-item"> Content .. </li>
</ol>
24. What are bootstrap alerts and how will you create them?
Bootstrap Alerts are a technique for styling user messages. They send contextual feedback messages in response to common user behaviors. To alert, you can add an optional close icon. Create a wrapper <div> and add a class of .alert and one of the four contextual classes to create a basic alert.
25. What are the steps to create a progress bar using bootstrap?
To create a progress bar:
- Use class progress inside a div class.
- Inside the already made div class, add another div tag with a class .progress-bar.
- Mention the progress of the bar under a style attribute using the width as a percentage. For eg- style=”width:50%
26. Difference between Bootstrap 4 and Bootstrap 5.
Feature | Bootstrap 4 | Bootstrap 5 |
---|
jQuery Dependency | Requires jQuery | Removed jQuery, using vanilla JavaScript |
---|
Grid System | Uses .row and .col-* classes | Introduced .g-* for gutters and improved grid system |
---|
Flexbox | Flexbox-based layout | Improved Flexbox support and new utility classes |
---|
Form Controls | Custom form controls required jQuery | Redesigned form controls with improved styles and no dependency |
---|
Card Columns | .card-columns used for card layout | Removed .card-columns, replaced with CSS Grid layout |
---|
Colors | Limited color palette | Expanded color palette with more variations |
---|
When the user hover the element through mouse-pointer, the Tooltip component appears as a little pop-up box. The Popover component shows as a pop-up box when the user clicks on an element. More info might be stored in the popover.
The popover will show on the right side of the element by default, while the tooltip will appear on the top.
28. What is column ordering in Bootstrap?
Column ordering classes in Bootstrap help to change the order of our grid system based on different screen sizes eg: desktop, mobile, tablet, and smartwatches. This makes the website more responsive to different screen sizes.
We use a handful of media queries for delivering different style sheets to different devices, to create sensible breakpoints for our layouts and interfaces. Most of the breakpoints are based on the minimum viewport width and allow the element to resize as the viewport changes.
Bootstrap uses the following media query ranges or breakpoints in Sass source files for layouts, grid systems and components by default.
30. What is Normalize in Bootstrap?
Bootstrap provides cross-browser uniformity by using normalize. CSS resets have been replaced by normalize.css, a modern, HTML5-ready alternative. By default styling, it improves cross browser uniformity in HTML element.
31. In Bootstrap, what are the two method for displaying code?
To display the code on our webpage, bootstrap has some tags that can be used to display the code.
Method 1: The inline snippet of code wrapped in <code> tag. Inline code should be wrapped in <code> tags. The text which will be displayed is fixed-width and of red font color.
Method 2: Code block using <pre> tag to display the code as a standalone block element. For displaying multiple lines of code we can use this tag.
32. What are Bootstrap panels? How to create a Bootstrap panel with a heading.
A panel is a rectangular component of Bootstrap, typically used to add content to the website. It can also have a header or footer, or both. Bootstrap also provides various classes to add padding to the content or multiple colors to make it more attractive.
CDN Link: First, include the style sheet in the code to use Bootstrap for creating the panel.
<link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css%E2%80%9D>
Add the following syntax to have a panel with the heading. The panel-heading class enables us to have a heading for our panel.
Scrollspy works according to the scroll position or the position at which the user is currently seeing.It targets the navigation bar contents automatically on scrolling the area. Scrollspy can be implemented in two ways:
- Horizontal scrollspy
- Vertical scrollspy
34. Why do we use the affix plugin in Bootstrap?
For affixing a <div> to a certain area on a webpage, we utilize the affix plugin in Bootstrap. The plugin also lets you toggle pinning for the attached <div> on and off. The most common application of the affix plugin in Bootstrap is social icons.
The attached <div> starts at a specific point on the page and scrolls with it. However, beyond a certain point, it will be stuck in place, preventing the remainder of the webpage from scrolling.
Bootstrap offers a variety of button classes:
- .btn-primary: Blue-colored button.
- .btn-secondary: Gray button.
- .btn-success: Green button.
- .btn-danger: Red button.
- .btn-warning: Yellow button.
- .btn-info: Light blue button.
- .btn-light: Light gray button.
- .btn-dark: Dark button.
- .btn-link: Styled as a link.
Buttons36. Why do we need to use Bootstrap?
- Faster and Easier Web Development.
- It creates Platform-independent web pages.
- It creates Responsive Web-pages.
- It is mobile web application.
37. How to create thumbnails using Bootstrap?
Step-by-step guide for the implementation:
- Step 1: Include Bootstrap and jQuery CDN into the <head> tag before all other stylesheets to load our CSS.
- Step 2: Add <div> tag in the HTML body with class row. In that <div> create four div sections to create four images.
- Step 3: Add “col-sm-6” and “col-md-3” to four div sections which creates a webpage responsive.
- Step 4: Add <a> tag with class value thumbnail to define the link of the image in the next line.
<a href="#" class="thumbnail">
38. What do you mean by the Bootstrap well?
In Bootstrap, a well is a box that makes content appear inset. It's a way to style content on a web page.
A Button Group in Bootstrap is a collection of buttons placed together in a horizontal or vertical arrangement. Button groups allow you to create better UI for interactive elements by keeping related buttons aligned together. The .btn-group class is used for basic button groups. You can use the class .btn to wrap a set of buttons in .btn-group.
Grouped ButtonBootstrap Interview Questions - Advanced
40. What are the two types of spinners that you can create using Bootstrap?
The two types of spinners that you can create using Bootstrap are border spinners and growing spinners.
- Border spinners: The default spinner type in Bootstrap, A lightweight loading indicator, and A spinning border around a central point.
<div class= "spinner-border" ></div>
- Growing spinners: An optional type of spinner in Bootstrap. A throbber style indicator. They Repeats growth, but doesn't technically spin.
<div class= "spinner-grow" ></div>
41. Discuss the Bootstrap table and various classes that can change the table's design.
Bootstrap provides a series of classes that can be used to apply various styling to the tables such as changing the heading appearance, making the rows stripped, adding or removing borders, making rows hoverable, etc. Bootstrap also provides classes for making tables responsive.
- .table class is used to create a simple Bootstrap table. This class name is used with the <table> tag to create a table.
- .table-stripped class is used to create alternate dark and light rows. For creating striped table we can use the combination of table and table-stripped classes within the <table> tag.
- .table-bordered class is used to add borders on all sides of the table and cell. Use the combination of table and table-bordered classes within the <table> tag to create a bordered table.
- .table-hover class is used to add the hover effect on table rows. Use the combination of table and table-hover classes within the <table> tag to create a hover rows table.
42. Write the HTML code to create a basic toast.
Toast is used to create something like an alert box which is shown for a short time like a couple of seconds when something happens. Like when the user clicks on a button or submits a form and many other actions.
HTML
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
/* Customizing the Toast */
.toast {
background-color: #f8f9fa;
border: 1px solid #dee2e6;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.toast-header {
background-color: #007bff;
color: white;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.toast-body {
font-size: 16px;
padding: 12px;
}
/* Close button */
.btn-close {
color: white;
}
/* Adding colors to body and header for different toast types */
.toast-success {
background-color: #28a745;
}
.toast-danger {
background-color: #dc3545;
}
.toast-warning {
background-color: #ffc107;
}
.toast-info {
background-color: #17a2b8;
}
.toast-header .me-auto {
font-weight: bold;
}
</style>
<body>
<!-- Toast Container -->
<div class="toast-container position-fixed top-0 end-0 p-3">
<!-- Basic Toast (success) -->
<div class="toast toast-success" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-header">
<strong class="me-auto">Success</strong>
<small>Just now</small>
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
</div>
<div class="toast-body">
This is a success toast notification with custom colors.
</div>
</div>
<!-- Basic Toast (danger) -->
<div class="toast toast-danger" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-header">
<strong class="me-auto">Error</strong>
<small>Just now</small>
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
</div>
<div class="toast-body">
This is a danger toast notification to highlight an error.
</div>
</div>
<!-- Basic Toast (warning) -->
<div class="toast toast-warning" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-header">
<strong class="me-auto">Warning</strong>
<small>Just now</small>
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
</div>
<div class="toast-body">
This is a warning toast notification for caution.
</div>
</div>
<!-- Basic Toast (info) -->
<div class="toast toast-info" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-header">
<strong class="me-auto">Info</strong>
<small>Just now</small>
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
</div>
<div class="toast-body">
This is an info toast notification providing some details.
</div>
</div>
</div>
</body>
</html>
Output
Basic Toast43. What are badges? Which class will you use to make your badge look more rounded?
Badges are simple and basic components that are used to display an indicator or count a number. This is quite useful for mail count and alerting purposes, among other things. Badges are identical to labels, with the exception that they have more rounded corners.
The .badge-pill class is used to make the badges more rounded.
44. What are the steps to create an animated progress bar using bootstrap?
Step By Step Guide to Animate Progress Bar
- Step 1: Add Bootstrap and jQuery CDN inside the <head> tag before the other stylesheets.
- Step 2: Add a HTML <div> with a class of .progress and .progress-striped. Also add class .active to .progress-striped. Inside the <div> add an empty <div> with a class of .progress-bar and .progress-bar-success. Using CSS attribute specify the width for progress bar.
- Step 3: Add jQuery in <script> tag to animate progress bar to show progress.
45. Explain the modal in Bootstrap.
The modal component is a dialog box/popup window that is displayed on top of the current page, once the trigger button is clicked. However, clicking on the modal’s backdrop automatically closes the modal. Also, it must be kept in mind that Bootstrap doesn’t support nested modals as they create a bad UI experience for the user. Therefore, only one modal window is supported at a time.
46. What will be the output of the below code and why?
<div class="progress">
<div class="progress-bar bg-success" style="width: 65%">
<span class="sr-only">75% successfully completed</span>
</div>
<div class="progress-bar bg-warning" style="width: 20%">
<span class="sr-only">30% completed with warnings</span>
</div>
<div class="progress-bar bg-danger" style="width: 15%">
<span class="sr-only">15% did not complete</span>
</div>
</div>
If we use the same .progress parent element for numerous bars, Bootstrap will combine them into a single progress bar. The sum of the progress bar in Bootstrap is 100 percent, as we all know. As a result, the progress bar will display the full width and fully populated result.
47. Explain what is list group in Bootstrap and what is the use of it?
List Groups are used to display a series of content. We can modify them to support any content as per our needs. The use of List-Groups is just to display a series or list of content in an organized way.
48. Explain how to use the Dropdown plugin in Bootstrap.
- Wrap the child elements inside a .dropdown class.
- We can use either a button or an anchor tag for toggling. For toggling we need to use the .dropdown-toggle class and add data-bs-toggle =” dropdown” element to the parent class.
- For making the dropdown menu items use the .dropdown-menu class. Use .dropdown-item class with each item names.
49. Define lead body copy in Bootstrap.
Lead Body Copy is used to add emphasis to a paragraph in a body tag. The paragraph tags are inside the Body tags. This gives us a lightweight, large font size and a tall line height. This feature can be used using the pre-defined class “.lead” and see its functionality.
50. Name some alternatives to Bootstrap.
- Foundation
- Bulma
- Materialize
- Material Design Lite
- Skeleton
- Pure CSS
- Semantic UI
51. What is bootstrap pagination and how are they classified?
Pagination in Bootstrap is a way to link web pages together using a series of connected links. It's used to navigate between pages on a website.
- Add the .pagination class to an <ul> tag
- Use the .page-item class to style each pagination item
- Use the .page-link class to style the link in each pagination item
HTML
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<style>
.pagination {
display: inline-flex;
list-style-type: none;
padding: 0;
}
.page-item {
margin: 0 5px;
}
.page-link {
color: blue;
text-decoration: none;
padding: 8px 16px;
}
.page-link:hover {
background-color: #f1f1f1;
}
.active .page-link {
font-weight: bold;
background-color: #e0e0e0;
}
</style>
<body>
<div class="container text-center mt-5">
<ul class="pagination">
<li class="page-item">
<a class="page-link" href="#">Previous</a>
</li>
<li class="page-item active">
<a class="page-link" href="#">1</a>
</li>
<li class="page-item">
<a class="page-link" href="#">2</a>
</li>
<li class="page-item">
<a class="page-link" href="#">3</a>
</li>
<li class="page-item">
<a class="page-link" href="#">4</a>
</li>
<li class="page-item">
<a class="page-link" href="#">Next</a>
</li>
</ul>
</div>
</body>
Output:
Bootstrap Pagination
Similar Reads
Bootstrap 5 Tutorial Bootstrap 5 is a front-end framework that helps developers create responsive and visually appealing websites quickly and efficiently. Bootstrap 5 simplifies the process of web development with its intuitive design system and extensive components. This version includes improved responsiveness, stream
6 min read
Bootstrap 5 Introduction Bootstrap is a free and open-source collection of CSS and JavaScript/jQuery code used for creating dynamic websites layout and web applications. Bootstrap is one of the most popular front-end frameworks which has really a nice set of predefined CSS codes. Bootstrap uses different types of classes to
4 min read
Layout
Bootstrap 5 Layout BreakpointsBootstrap 5 layout breakpoints are specific screen widths at which the appearance and behavior of elements on a webpage change. These breakpoints enable responsive design, adjusting content layout and design for various devices, like mobile, tablet, and desktop.Core Concept:Breakpoints in responsive
3 min read
Bootstrap 5 Layout ContainersBootstrap5 Layout Containers are considered the most basic layout that can be used and they can be used to contain other layouts. Containers are basically used to add pad the contents inside or center the items inside the container. In this article, we'll see Bootstrap 5 Layout Containers.Layout Con
3 min read
BootStrap 5 Layout Grid SystemBootStrap5 Layout Grid system is responsive. It comes with a flexbox and allows up to 12 columns across the page. You can also group the columns together. The grid system is a powerful mobile-first responsive flexbox grid. How it works: Hereâs how the grid system comes together: Its grid supports si
3 min read
Bootstrap 5 ColumnsBootstrap 5 Columns facilitates the different option for the alignment, ordering, and offsetting of the Columns with the help of flexbox grid system. The different available column classes can be utilized to manage widths of non-grid elements. Bootstrap 5 Columns: The following components is used th
2 min read
Bootstrap 5 GuttersBootstrap 5 Gutters are used to give padding between columns, responsively space, and align content to the grid system. How gutters works? Using the .padding-right and .padding-left classes, we can add padding to the right and left of each column. Gutters, which are produced by horizontal padding, a
2 min read
Bootstrap 5 UtilitiesBootstrap 5 provides a lot of utilities to make a stylish, mobile-friendly, and responsive front-end website without using any CSS code. The utility layout is used for showing, hiding, aligning, and spacing content. Bootstrap 5 utilities for layout: Changing display: Bootstrap 5 provides some displa
2 min read
Bootstrap 5 Z-indexIn Bootstrap 5, the z-index property controls the stacking order of elements. It defines the depth of an element along the z-axis, determining which elements appear above others. Higher values place elements closer to the foreground, while lower values move them to the background. Bootstrap 5 z-inde
2 min read
Content
Bootstrap RebootBootstrap Reboot is used to reboot all the styles of some specific elements. It normalizes HTML elements with opinionated styles, sets better defaults for <html> and <body> elements, optimizes text rendering with native font stacks, and resets margins, paddings, and other styles for cons
2 min read
Bootstrap 5 TypographyBootstrap 5 Typography styles and formats text, providing customized headings, subheadings, lists, paragraphs, and font styles. It supports global settings for font stack, headings, link styles, ensuring consistency across devices. Here's the information represented in a table format: TermDescriptio
2 min read
Bootstrap 5 ImagesBootstrap 5 provides classes for responsive images, ensuring they scale appropriately within their parent elements, maintaining aspect ratio, and enhancing appearance across devices without overflowing.Types of Images:TermDescriptionResponsive imagesResize images according to parent element and scre
1 min read
Bootstrap 5 TablesBootstrap 5 provides a series of classes that can be used to apply various styling to the tables such as changing the heading appearance, making the rows striped, adding or removing borders, making rows hoverable, etc. Bootstrap also provides classes for making tables responsive. Bootstrap 5 Tables:
2 min read
Bootstrap 5 FiguresA Bootstrap5 Figures is a component that provides a way to display a piece of content along with an image. If we want to show the image with an optional component, the figure class in Bootstrap 5 is used. Bootstrap 5 Figures Classes: figure: used to display content, like any image with an optional c
2 min read
Forms
Bootstrap-5 FormsForm controls: <input>, <select>, <textarea> are the tags used for general appearance like input field, select item and textareas. Â Â Â Note: To make the user interface more presentable, use properties like padding, margins as per the need. Example:Â HTML <!DOCTYPE html> <
2 min read
Bootstrap 5 Form ControlsForm controls like <input>, <select>, <textarea> are the tags used to add custom styles, sizing, focus states to  input field, select item, and text-areas etc. Below are utilities of form control:Sizing: This utility is used to set the label of the form input field in different siz
2 min read
Bootstrap 5 SelectBootstrap 5 Select form is used to create customized select elements with custom CSS that changes the elementâs initial appearance. Bootstrap 5 Select Options: Default: It is used to create a default list of options from which a single option can be selected. To create a select option, we use <se
2 min read
Bootstrap 5 Checks and RadiosBootstrap 5 provides us with utility Checks and radios. This utility is used for creating checkboxes and radio without using CSS.Bootstrap 5 Checks and Radios:Checks: The checkboxes are used for selecting one or several options in a list.Radios: The radios are for selecting one option from many opti
2 min read
Bootstrap 5 RangeBootstrap 5 Range is the limit slider between values that can vary. Bootstrap provides us with a custom range of inputs that provides consistent cross-browser styling. The value and background for the range slider are both styled to look the same across all other browsers. Disabled: It is grayed out
2 min read
Bootstrap 5 Input GroupBootstrap 5 Input Group allows extending the default form controls easily by incorporating text, buttons, or button groups on either side of textual inputs, custom selects, and custom file inputs. Bootstrap 5 facilitates several different components that can be utilized to create the basic Input gro
3 min read
Bootstrap 5 Floating labelsBootstrap 5 floating labels are form labels that float over input fields, improving UX. Wrap form controls like <input>, <label>, <textarea>, <select> inside <div> with class .form-floating. Ensure these elements precede <label> inside the floating <div>.Boo
2 min read
Forms Layout
Bootstrap 5 Layout FormsBootstrap 5 Layout forms provide control of the input field and custom positioning. All the fields should be placed inside the <form> tag. By default the form is aligned vertically as the default value for display is block and is set to 100%. We can use additional classes to change this defaul
2 min read
Bootstrap5 Layout UtilitiesBootstrap 5 Layout Utilities facilitate mobile-friendly, responsive websites. They offer numerous utility classes for tasks like displaying, hiding, aligning, and spacing content, enabling versatile modifications tailored to different design requirements. NameDescriptionChanging displayBootstrap 5 p
2 min read
Bootstrap 5 Layout Form GridBootstrap 5 Layout Form Grid is used to create a complex form using grid classes. The form grid layout required multiple columns of different widths and alignments. To create a form grid, we use .row and .col classes. Form Grid Layout used Classes: .row: This class is used to create a row of a form
2 min read
Bootstrap 5 Layout GuttersGutters are the gaps between the columns in bootstrap's grid layout. The gutter modifier classes can be used to change the widths of the gutters. There are 3 primary gutter modifier classes that are listed below: Bootstrap5 Layout Gutter Modifier Classes: g-*: This class is used to set the width of
2 min read
Bootstrap 5 Layout Horizontal formBootstrap 5 Layout Horizontal form is used to create horizontal forms by using the .row class with .col-*-* classes to specify the width of your labels and controls. Also, use the .col-form-label class with <label> element to set the form label in vertically centered. Layout Horizontal form us
2 min read
Bootstrap 5 Layout Horizontal form label sizingBootstrap 5 Layout Horizontal form label sizing is used to set the label of the form input field in different sizes. To set the label size, use the .col-form-label-sm or .col-form-label-lg class to <label> or <legend> tag with the size of .form-control-lg and .form-control-sm. Horizontal
2 min read
Bootstrap 5 Layout Column sizingBootstrap 5 Layout Column sizing is used to set the width of the column element. To create equal widths columns, .col within .row classes are used. We can also use the subset of classes to set split the columns unequally. Layout Column sizing used Classes: .row: This class is used to create rows for
2 min read
Bootstrap 5 Layout Auto-sizingBootstrap5 layout Auto-sizing dynamically calculates the size height, width, and positions of the elements can be adjusted automatically. It uses a flexbox utility to vertically center the contents and changes .col to .col-auto so that your columns only take up as much space as needed.Bootstrap5 Lay
2 min read
Bootstrap 5 Layout Inline formsBootstrap 5 Layout Inline forms consist of a responsive horizontal layout. All of the elements are inline and left-aligned, and labels are alongside, and only apply to forms within viewports. Bootstrap 5 Layout Inline forms used classes:row-cols-lg-auto: This class is used to create horizontal layou
2 min read
Bootstrap 5 ValidationBootstrap 5 Validation refers to the process of enhancing form input accuracy in web development. It utilizes HTML5 validation features, providing feedback to users regarding input correctness. This feature supports customization with custom styles and JavaScript for improved user experience.Bootstr
4 min read
Components
Bootstrap 5 AccordionBootstrap 5 Accordion organizes content into collapsible panels, enabling space-efficient presentation of information. It allows users to toggle between panel visibility, enhancing user experience, and content organization within web applications. iframe { width: 100%; height: 500px;} @media (max-wi
3 min read
Bootstrap 5 AlertsBootstrap 5 Alerts are customizable components used to convey important information to users. They come in various styles such as success, warning, danger, and info, providing visual feedback to users based on different actions or states within a web application. iframe { width: 100%; height: 450px;
2 min read
Bootstrap 5 BadgesBootstrap 5 Badges are small components used to highlight specific information, typically in lists or inline with other content. They provide visual cues through colored backgrounds and customizable text, helping to draw attention to key details or status indicators within a webpage or application.
2 min read
Bootstrap BreadcrumbBootstrap 5 Breadcrumb simplifies website navigation by displaying a sequential path to the current page. It enhances user experience by visually indicating the hierarchical structure of the site, facilitating easy navigation as per Bootstrap 5 documentation. Bootstrap 5 Breadcrumb TermDescriptionBr
2 min read
Bootstrap 5 ButtonsBootstrap 5 Buttons are pre-styled components in the Bootstrap framework, offering consistent design and functionality. They streamline development by providing ready-to-use button styles, sizes, and behaviors, ensuring a cohesive and responsive user interface across web applications with minimal CS
3 min read
Bootstrap 5 | Button groupBootstrap 5 is the latest major release by Bootstrap in which they have revamped the UI and made various changes. Button group is a component provided by Bootstrap 5 which helps to combine the buttons in a series in a single line. All types of buttons are supported by it. Syntax: <div class="btn-
4 min read
Bootstrap 5 | CardBootstrap 5 is the latest major release by Bootstrap in which they have revamped the UI and made various changes. The card is a component provided by Bootstrap 5 which provides a flexible and extensible content container with multiple variants and options. It includes options for headers and footers
11 min read
Bootstrap 5 CarouselBootstrap 5 Carousel is a slideshow component for cycling through images or slides, allowing users to showcase multiple pieces of content in a visually appealing and interactive way. It offers various options for customization and responsive design.Bootstrap Carousel Classes:ClassDescriptioncarousel
3 min read
Bootstrap 5 | Close buttonBootstrap 5 provides a new component which is a Close button which can be used for dismissing content like modals and alerts. It can be included in the webpage using bootstrap.js or bootstrap.min.js. This component can be combined with models, alerts, and popovers. Disabled close buttons have pointe
1 min read
Bootstrap 5 CollapseBootstrap 5 is the latest major release by Bootstrap in which they have revamped the UI and made various changes. Collapse is used to toggle the visibility of content across your project with a few classes and the JavaScript plugins which comes with Bootstrap 5. The working of collapse component is
3 min read
Bootstrap 5 DropdownsBootstrap 5 is the latest major release by Bootstrap in which they have revamped the UI and made various changes. Dropdowns are toggleable, contextual overlays for displaying lists of links and more. Theyâre made interactive with the included Bootstrap dropdown JavaScript plugin. Theyâre toggled by
9 min read
Bootstrap 5 List groupBootstrap 5 is the latest major release by Bootstrap in which they have revamped the UI and made various changes. List groups are a flexible and powerful component for displaying a series of content. These can be modified and extended to support just about any content within. Use .list-group and .li
5 min read
Bootstrap 5 ModalBootstrap 5 is the latest major release by Bootstrap in which they have revamped the UI and made various changes. Modals are used to add dialogs to your site for lightboxes, user notifications, or completely custom content. Modals are built with HTML, CSS, and JavaScript. Theyâre positioned over eve
7 min read
Navbar
Bootstrap 5 Navbar BrandBootstrap 5 Navbar brand is applied to the typical branding logo that sees in the top navigation bar. It may contain an image logo or text, etc. A Navbar helps readers in selecting topics, links, or sub-topics of their interest. Bootstrap 5 Navbar Brand: Text: The text in the user interface is added
3 min read
Bootstrap 5 Navbar Brand TextA navigation bar is used in every website to make it more user-friendly so that the navigation through the website becomes easy and the user can directly search for the topic of their interest. Navbar Brand Text is used to add text in place of the brand logo. We can write text or links using the nav
2 min read
Bootstrap Navbar Brand ImageBootstrap Navbar Brand Image is used to put the image inside of a navbar, a navigation bar component in the Bootstrap framework. It typically appears at the top of a webpage, serving as a visual identifier for the website or application and linking back to the homepage. Pre-requisite: To use images
2 min read
Bootstrap 5 Navbar NavBootstrap 5 Navbar Nav simplifies navigation creation by grouping navigation links within a container element with the nav class. Use nav-item for each link and nav-link for styling. Customize with optional classes like "active" for the current page. Bootstrap 5 Navbar Nav class: There is no specifi
2 min read
Bootstrap 5 Navbar FormsBootstrap 5 Navbar Forms are used to create the components like a search bar, or login within a navbar. Bootstrap 5 Navbar Forms Classes: No special classes are used in Navbar Forms. You can customize the form using Navbar and Form classes Syntax: <nav class="navbar"> <form> <input cl
2 min read
Bootstrap 5 Navbar TextNavbar Text is used to put some text on the navbar. To do so Bootstrap 5 brings the Bootstrap 5 Navbar Text features. Creating a navbar is obvious when we are creating a website, and putting text on the navbar is required to guide the visitors to the right destination. Navbar Text Class: navbar-text
2 min read
Bootstrap 5 OffcanvasBootstrap is a free and open-source collection of CSS and JavaScript/jQuery code used for creating responsive & dynamic websites layout and web applications. Offcanvas is one of the features of Bootstrap to make web pages more attractive, along with enhancing the user experience.Offcanvas is a s
12 min read
Bootstrap 5 PopoversBootstrap 5 Popovers Provides directional placement options (top, bottom, left, right), dismiss on click, and support for disabled elements. Styled with Sass, they feature various methods, options, and events for dynamic interaction and customization. Bootstrap 5 Popovers: AspectDescriptionFour dire
2 min read
Bootstrap 5 ProgressBootstrap 5 is the latest major release by Bootstrap in which they have revamped the UI and made various changes. A progress bar is used to display the progress of a process on a computer. A progress bar displays how much of the process is completed and how much is left. You can add a progress bar o
5 min read
Bootstrap 5 ScrollspyBootstrap 5 Scrollspy is used to automatically update the navigation links based on the scroll position, highlighting the corresponding section in the viewport.To use scrollspy in Bootstrap 5, we need to add the data-bs-spy="scroll" attribute to the element that should be used for scrolling and spec
4 min read
Bootstrap 5 SpinnersIn this article, we will implement spinners in the website using Bootstrap & will also see the implementation of different types of spinners through the example. The spinners are used to specify the loading state of a component or webpage. Bootstrap facilitates the various classes for creating d
3 min read
Bootstrap 5 ToastsBootstrap 5 Toasts are notifications or messages which the users receive whenever they perform certain actions. They can easily be customized. Overview: Toasts need to be initialized. Apply autohide: false so that the toasts don't automatically hide.Placement: You can place toasts as you want. The t
3 min read
Bootstrap 5 TooltipsA Tooltip is used to provide interactive textual hints to the user about the element when the mouse pointer moves over. The tooltip is quite useful for displaying the description of different elements on the webpage. To create a tooltip, we need to add the data-bs-toggle="tooltip" attribute to an el
3 min read
Helpers
Bootstrap 5 ClearfixBootstrap 5 .clearfix helper class facilitates clearing and fixing the floated content in an element or container by adding the clearfix utility. Basically, without clearfix class, the floated content/elements act like they have a position set to absolute and to fix that, we use the clearfix helper
2 min read
Bootstrap 5 Colored linksBootstrap 5 Colored links are used to add colors to the link element. To set the colored links, we use the classes of utilities built on our theme colors. To make different color links, we will use .link-* class and add CSS styles to it. Colored links used Classes: link-primary: This class is used t
2 min read
Bootstrap 5 RatiosBootstrap 5 provides ratios, which can be used to create fixed-ratio containers. These containers maintain a specific aspect ratio, regardless of the size of the screen or the content within them. Bootstrap 5 Ratios: Aspect ratio: The proportionality between an element's height and breadth is known
2 min read
Bootstrap 5 PositionBootstrap 5 Position offers utility classes to control the positioning of elements. It includes classes like "position-static," "position-relative," "position-absolute," etc., facilitating precise element positioning on web pages for improved layout and design control.NameDescriptionposition-staticD
2 min read
Bootstrap 5 Visually hiddenBootstrap 5 Â Visually hidden are used to visually hide an element so that it does not display on the page while still allowing it to be exposed to assistive technologies. .The visually-hidden class hides the element by default and the visually-hidden-focusable class visually hides an element but dis
2 min read
Bootstrap 5 Stretched linkBootstrap 5 Stretched link is used to make any component clickable. Multiple links are not recommended. The card in bootstrap has position:relative by default, so we can easily add .stretched-link class to a link. Bootstrap 5 Stretched link class: stretched-link: It is added to <a> tag to make
2 min read
Bootstrap 5 Text TruncationBootstrap 5 is a catalog of UI components that enables developers to develop their websites and applications in less time by using the pre-built components and utility classes. This article will see Bootstrap 5 Text truncation.Text Truncation is used to truncate long statements and paragraphs using
2 min read
Extend