0% found this document useful (0 votes)
20 views3 pages

Bootstrap

Uploaded by

payaldhenge0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views3 pages

Bootstrap

Uploaded by

payaldhenge0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Bootstrap Interview Questions

1. What is Bootstrap?
Answer: Bootstrap is a free and open-source front-end framework for
designing websites and web applications. It contains HTML, CSS,
and JavaScript components for developing responsive and mobile-
first websites.
2. How do you include Bootstrap in a project?
Answer: You can include Bootstrap in a project by linking to the
Bootstrap CDN in your HTML file or by downloading the Bootstrap
files and linking them locally.
3. What is the purpose of the container class in Bootstrap?
Answer: The container class is used to create a centered and
responsive fixed-width layout. It provides a responsive, fixed-width
container.
4. What are the differences between container and container-
fluid?
Answer: The container class provides a fixed-width container that
responds to the width of the viewport, while container-fluid provides
a full-width container that spans the entire width of the viewport.
5. Explain the Bootstrap grid system.
Answer: The Bootstrap grid system is based on a 12-column layout.
It uses a series of containers, rows, and columns to layout and align
content. It allows for responsive design by specifying different
column configurations for different screen sizes.
6. How do you use Bootstrap's responsive utilities?
Answer: Bootstrap's responsive utilities are classes that show or hide
content based on the viewport size (e.g., d-none, d-sm-block, d-lg-
none).
7. What are Bootstrap breakpoints?
Answer: Breakpoints are predefined screen widths at which the
layout adjusts to provide an optimal viewing experience. The default
breakpoints in Bootstrap are xs (extra small), sm (small), md
(medium), lg (large), and xl (extra large).
8. What is the purpose of the card component in Bootstrap?
Answer: The card component is a flexible and extensible content
container with multiple variants and options. It includes options for
headers, footers, images, and a variety of content within.
9. How can you create a responsive navbar in Bootstrap?
Answer: A responsive navbar can be created using the navbar
component, along with the navbar-expand-* class to control when the
navbar should expand or collapse based on the viewport size.
10. What are Bootstrap's helper classes, and can you
provide some examples?
Answer: Helper classes in Bootstrap are utility classes that can be
used to quickly style elements. Examples include m-3 (margin), p-2
(padding), text-center (text alignment), and bg-primary (background
color).
11. How do you customize Bootstrap using Sass?
Answer: Bootstrap can be customized using Sass by modifying the
_variables.scss file or creating a new file with custom variables and
importing Bootstrap's Sass files in a specific order to override default
styles.
12. Explain how you can implement a modal in Bootstrap.
Answer: To implement a modal in Bootstrap, you need to use the
modal component, which involves creating a modal structure with
modal-dialog, modal-content, modal-header, modal-body, and modal-
footer classes. The modal is triggered using JavaScript or data
attributes.
13. How do you handle form validation using Bootstrap?
Answer: Bootstrap provides built-in form validation styles that can be
applied by adding validation classes such as was-validated to the form
and using is-valid and is-invalid classes on form controls based on
their validation state.
14. What is the purpose of the flex utility in Bootstrap, and
how do you use it?
Answer: The flex utility in Bootstrap is used to create flexible and
responsive layouts using CSS Flexbox. It includes classes like d-flex,
flex-row, flex-column, justify-content-center, and align-items-center
to control the layout and alignment of elements.
15. Describe the process of creating a custom theme in
Bootstrap.
Answer: Creating a custom theme in Bootstrap involves modifying
the Bootstrap variables, adding custom styles, and using the Bootstrap
theming tools. This can be done by overriding variables in a custom
Sass file and importing the necessary Bootstrap components to apply
the custom styles.
These questions cover a wide range of Bootstrap topics, helping
assess the depth and breadth of a candidate's knowledge and
experience with the framework.

You might also like