BOOTSTRAP
BOOTSTRAP
1
<button class="btn btn-primary">Get 7. What does the Bootstrap package include?
Started</button> The Bootstrap package includes,
<button class="btn btn-secondary">Get Scaffolding: Bootstrap provides a basic structure with
Started</button> Grid System, link styles, and background.
</body> CSS: Bootstrap comes with the feature of global CSS
</html> settings, fundamental HTML elements style and an
HTML advanced grid system.
2
9. What are the differences between different
Uses Uses Uses
bootstrap versions?
better Cards No
Some of the differences between Bootstrap 5, Cards instead of Cards
Bootstrap 4, and Bootstrap 3 are: wells and
Bootstrap 5 Bootstrap 4 Bootstrap 3 panels
Buttons with
Has six Has five Has different sizes btn-sm, btn-lg
class class four (Small, large)
names names class
prefixes prefixes names
(col-xxl, (col-xl, prefixes Block-level
btn-block
col-xl, col- col-lg-, (col-lg-, buttons
lg-, col- col-md-, col-md-
md- , col- col-sm-, , col-
sm-, col-) col-) sm-, 11. Design two HTML buttons, success and danger,
col-xs-) using Bootstrap class names.
<button class="btn btn-success">Get
Uses CSS Uses CSS Uses Started</button>
Flexbox, Flexbox CSS <button class="btn btn-danger">Get Started</button>
CSS Float
functions and
12. How to add an HTML button and style it using
and Clear
Bootstrap to the existing HTML document?
variables
• Add the HTML button element in the
HTML body element.
Has only Has only Has
responsiv responsiv non • Include the Bootstrap CDN in the
e layout e layout respons HTML head element.
ive • Add the Bootstrap button class names to the
layout HTML button element.
option <button class="btn btn-success">Get
Started</button>
3
13. What are the types of lists supported by • It uses a 12 column system for the layouting.
Bootstrap? We can create up to twelve columns across
Bootstrap supports all three types of lists, ordered the page.
(ol), unordered(ul) and description(dl) lists. o Container : The purpose of a
container is to hold rows and
columns.
14. What is a Carousel?
o Row : The purpose of a row is to wrap
The Carousel is a slideshow for cycling through
all the columns.
images, text, etc. Slides will change for every few
seconds. o Column : We should place the
columns inside a row and the content
We can add the different images in the Carousel by
inside a column.
changing the image URL in the value of the HTML
▪ We can specify the number of
src attribute.
columns our content should
Bootstrap carousels support previous/next controls occupy in any device. The
and indicators, etc. number of columns we
specify should be a number in
15. Which of the following is not the Bootstrap the range of 1 to 12.
background class name? ▪ The Bootstrap class names
a. bg-info col-* indicates the number of
columns you would like to use
b. bg-primary out of the possible twelve
c. bg-danger columns per row. For
d. bg-error example, col-1, col-5, etc.
Answer: Option D - bg-error
19. Can a 14 or 16 column grid system be made?
16. What are Contextual classes of table in Bootstrap? Bootstrap supports the customization of Bootstrap
grid class names.
• .active: Applies the hover color to a particular
row or cell. The number of grid columns can be modified by Sass
variables. Sass variables are similar to the JS variables
• .success: Indicates a successful or positive
where we used to store the information.
action.
• $grid-columns is used to generate the widths
• .warning: Identifies a warning that might need
(in percent) of each column
attention.
• $grid-gutter-width sets the padding between
• .danger: Indicates a dangerous or potentially
the columns.
negative action.
$grid-columns: 12 !default;
$grid-gutter-width: 30px !default;
17. How do you use Bootstrap to make a page
responsive?
We can make a page responsive by using the 20. What is col and span in Bootstrap?
Bootstrap Grid System which helps us to create col means column in Bootstrap. Bootstrap Grid System
columns and rows to build a responsive layout of the allows up to 12 columns across the page and each
page. column is represented as a span.
18. What is the Bootstrap grid system? 21. What is a Bootstrap Container?
Bootstrap Grid System is a collection of reusable code The container is the most basic layout class name in
snippets to create responsive layouts. It is made up of Bootstrap and is required when using the Bootstrap
containers, rows, and columns. Grid System.
4
The purpose of a container is to hold rows and
Margin Bootstrap Padding Bootstrap
columns.
class names class names
Bootstrap comes with three different containers:
• .container: It is a responsive, fixed-width
container. Its max-width changes at each
breakpoint.
m-*, mt-*, mr-*, p-*, pt-*, pr-*, pb-
• .container-fluid: It is a full-width container
mb-*, ml-* *, pl-*
spanning the entire width of the viewport.
(width: 100%)
• .container-{breakpoint}: It is 100% wide until
The asterisk (*) symbols can be any number in the
the specified breakpoint. For higher
range of 0 to 5 or auto.
breakpoints, it takes the max-width.
Extra small
<576px col-
devices
flex-
flex-row, flex-column, etc.
direction
Small col-
>=576px
devices sm-
justify-content-start,
Medium col- justify-content-end, justify-
>=768px justify-
devices md- content-center, justify-
content
content-between, justify-
content-around, etc.
Large
>=992px col-lg-
devices
align-items-start, align-
items-end, align-items-
Extra large align-
>=1200px col-xl- center, align-items-
devices items
baseline, align-items-
stretch, etc.
Display Utilities
Examples: d-none, d-sm-none, d-md-none, etc.
align-self-start, align-self-
end, align-self-center,
align-self
23. What are the predefined class names of margin align-self-baseline, align-
and padding in Bootstrap? self-stretch, etc.
5
25. Explain the Bootstrap class names d-none and d-
block ?
Class Description
Name
d-
Displays an HTML element
block
1. What is a Breadcrumb?
Breadcrumb indicates the current page's location
within a navigational hierarchy.
For example,
If the breadcrumb shows, Home / Library / Data
It means, the user is navigated to the Home page, and
then navigated from Home page to Library page, and
then Library page to Data page.
The current page is Data Page. When clicked on the
Home or Library page, the user can be navigated to
the corresponding page.