- Why Bootstrap is used for Mobile Web development?
- Explain the features of Bootstrap.
- Define the key components of Bootstrap.
- What do you understand by Bootstrap container?
- What do you mean by Bootstrap Classloader?
- How many types of layouts are there in Bootstrap?
- What do you mean by the Bootstrap Grid System?
- Define Fluid Layout.
- Define Fixed Layout.
- Please explain Normalize in Bootstrap.
- How can you display code in Bootstrap?
- When will you use <code> tag and <pre> tag?
- What is a progress bar in bootstrap?
- Can you enumerate the various lists supported by Bootstrap?
- Name the contextual classes that are used with the progressive bar in bootstrap.
- What are responsive utility classes in Bootstrap?
- What are the different button styles in Bootstrap?
- What are Bootstrap alerts?
- Define Bootstrap thumbnails.
- Explain Modal plugin in Bootstrap.
- Which class is used for pagination in Bootstrap?
- Explain what is Bootstrap collapsing elements.
- What is Bootstrap Well?
- Explain the uses of the carousel plugin in Bootstrap.
- What do you mean by Glyphicons? How do you use them?
- Please provide an explanation of input groups in Bootstrap.
- How will you create a tabbed, pills, and vertical pills navigation menu in Bootstrap?
- What do you understand by the Bootstrap navbar? How will you create one?
- How can we customize links of pagination in Bootstrap?
- Explain the input group in Bootstrap.
- Write the ways to create a tabbed navigation menu in Bootstrap.
- In Bootstrap, how can you create a pills navigation menu?
- Can you explain Bootstrap breadcrumb?
- How do you create and customize thumbnails in Bootstrap?
- What do you understand by Bootstrap media objects?
- What purposes do the .media and .useful classes serve in Bootstrap?
- Can you explain the purpose of the Scrollspy plugin?
- Please enumerate the various contextual classes available for styling the panels in Bootstrap.
- How navbar works in Bootstrap?
- How we can create a navbar in Bootstrap?
- What is Bootstrap breadcrumb?
- What are labels in Bootstrap?
- What are badges in Bootstrap?
- What is a jumbotron in Bootstrap?
- How can we make image responsive in Bootstrap?
- What do you mean by normalize in Bootstrap?
- What is lead body copy in Bootstrap?
- Explain the concept of creating a vertical or basic form in Bootstrap.
Bootstrap Interview Questions and Answers (2023)
In this post, we have put together frequently asked Bootstrap Interview Questions and answers for beginner, intermediate and experienced candidates. These important questions are categorized for quick browsing before the interview.
Bootstrap General Interview Questions
Why Bootstrap is used for Mobile Web development?
It is used for Mobile Web development because it has responsive designs and templates which are easy to use.
Explain the features of Bootstrap.
Its features include:
Open source for use Compatibility with all browsers. Responsive designs Easy to use and fast.
Define the key components of Bootstrap.
Its components include:
Scaffolding: It has the grid system, background, styles. JS Plugins: Contains JS and jQuery plugins. Customize: Can customize frameworks. CSS: Contains CSS files.
What do you understand by Bootstrap container?
Bootstrap container behaves like a container where you can put HTML code and it is a part within the page where the content of the site can be placed to make it responsive and fast.
What do you mean by Bootstrap Classloader?
Bootstrap class loader is a part of java and a main parental class of class loader.
How many types of layouts are there in Bootstrap?
There are two types of layouts in Bootstrap.
Fluid Layout Fixed Layout
What do you mean by the Bootstrap Grid System?
The Bootstrap Grid System is a responsive, mobile-first system that scales up to 12 columns as per the increase in the device or viewport size. The system features predefined classes for easy layout options and powerful mix-ins for generating effectively semantic layouts.
Define Fluid Layout.
Fluid Layout is useful when you need to make an app that involves the full width of the screen i.e. Fluid Layout adjusts itself according to the browser size.
Define Fixed Layout.
A fixed layout is responsive and easy to use but just like the fluid layout, it cannot adjust itself according to the browser size. The fixed layout should be 940 px in most cases.
Please explain Normalize in Bootstrap.
For establishing cross-browser consistency, Bootstrap makes use of Normalize. It is a small CSS file capable of offering better cross-browser consistency in the default styling of HTML elements. Also, Normalize.css is an HTML5-ready and modern alternative to CSS resets.
How can you display code in Bootstrap?
You can display the code in two ways i.e. by using the <code> tag and by using the <pre> tag.
When will you use <code> tag and <pre> tag?
<code>tag is used to show the code inline and <pre>tag is used to show code with multiple lines.
What is a progress bar in bootstrap?
Progress bar is used with HTML tag style in HTML element using <progress> keyword. In bootstrap, we use html5 <progress> with CSS classes that have special features in bootstrap, which is only made for the progress bar.
Can you enumerate the various lists supported by Bootstrap?
Following are the three types of lists supported by Bootstrap:
Definition Lists – This type of list allows each list item to have both the <dt> and the <dd> elements. The <dt> denotes definition term, which is the term or phrase being defined. The <dd> element contains the definition for the <dt> element. Ordered Lists – This type of list follows some kind of sequential order. Also, it is prefaced by numbers. Unordered Lists – Traditionally styled with bullets, an unordered list doesn’t follow any particular order. Using the .list-unstyled class allows removing the bullets styling from the unordered list. For placing all list items on a single line, the .list-inline class can be used.
Name the contextual classes that are used with the progressive bar in bootstrap.
The contextual classes used with progressive bar are as follows.
Progress-success Progress-info Progress-warning Progress-danger
What are responsive utility classes in Bootstrap?
Responsive utility classes in bootstrap are a set of classes that are used to conceal or exhibit the HTML elements based on screen resolution that discerns by media query in bootstrap.
Example: “hidden-md-down”, It hides
What are the different button styles in Bootstrap?
In bootstrap, there are seven styles which we can use with the bootstrap button.
.btn-default. .btn-primary .btn-success .btn-info .btn-warning. .btn-danger. .btn-link.
What are Bootstrap alerts?
This is used to create presume alert messages, which adds style to the messages to look more noticeable to the user.
There are four classes in alerts: .alert-success, .alert-info, .alert-warning, .alert-danger.
Define Bootstrap thumbnails.
It is a way to use the layout images, videos, text, etc. in a grid system. We can create thumbnails by adding a tag with the class .thumbnails around the image.
This will add four pixels of padding and a grey border.
Explain Modal plugin in Bootstrap.
A model is an inherited window that is layered over its parent window. This is used to augment the user experience and adds different functionalities to the users. Model windows are created with the help of the modal plugin.
Which class is used for pagination in Bootstrap?
To add pagination on the webpage we have to use the class .pagination.
Explain what is Bootstrap collapsing elements.
To use this feature in bootstrap you have to add data-toggle=” collapse” to the controller element along with a data target to automatically assign the control of a collapsible element. We can use this by writing .collapse(options) etc.
What is Bootstrap Well?
Bootstrap well is a form of container which thrives or makes the content look recessed on the web page. It also wraps the content by using .well class.
Explain the uses of the carousel plugin in Bootstrap.
Carousel plugin in bootstrap is used to make sliders in the web pages or your site. There are several carousel plugins that are used in bootstrap to display large contents within a small space by adding sliders.
Example: .carousel(options), .carousel(‘pause’), .carousel(cycle’), .carousel(‘prev’), .carousel(‘next’).
What do you mean by Glyphicons? How do you use them?
Glyphicons are icon fonts that are used in web projects. Although Glyphicons Halflings aren’t free and require licensing in general, they are available free of cost for Bootstrap projects. Add the following code anywhere you wish to use the Glyphicons:
<span class = “glyphicon glyphicon-search”></span> Note: - For proper padding, it is advised to leave a space between the icon and the text.
Please provide an explanation of input groups in Bootstrap.
Input groups are simply extended Form Controls in Bootstrap. One can easily append and prepend buttons or text to the text-based inputs using the input groups. Appending and prepending content to an input field allows adding common elements to the user input.
You can append or prepend elements to a .form-control by:
Wrapping it in a <div> element with the class .input-group With the same <div> element, put the extra content inside a <span> element with the .input-group-addon class Finally, place the <span> element before or after the <input> element as required
How will you create a tabbed, pills, and vertical pills navigation menu in Bootstrap?
- For creating a tabbed navigation menu Start with a basic unordered list with the .nav base class Now, add the .nav-tabs class
- For creating a pills navigation menu Start with a basic unordered list with the .nav base class Now, add the .nav-pills class
- For creating a vertical pills navigation menu Stack the pills vertically using the .nav-stacked class Now, add the .nav and .nav-pills classes
What do you understand by the Bootstrap navbar? How will you create one?
One of the most prominent features of Bootstrap, a navbar is a responsive ‘meta’ component that serves as a navigation header for an application or website. There can be several navbars in an application or website.
In mobile views, a navbar collapses and becomes horizontal when the available viewport width increases. The navbar includes styling for basic navigation and site names. Here is how to create a navbar in Bootstrap:
Add the .navbar and .navbar-default classes to the <nav> tag Next, add role = “navigation” to the <nav> element Now, add .navbar-header, a header class, to the <div> element. For making the text slightly larger, include an <a> element with the navbar-brand class Add an unordered list with .nav and .navbar-nav classes for adding links to the Bootstrap navbar
How can we customize links of pagination in Bootstrap?
We can customize the links by using .disabled for unclickable links and .active for indicating the current page.
Explain the input group in Bootstrap.
Input group in bootstrap is put out from controls. By using an input group, we can easily add prepended and appended text or button to the text-based inputs.
We can prepend and append elements to a .form-control by taking all the elements in a <div> under a class .input-group. After that, place your extra content inside a <span> in same <div> by using class .input-group-addon after this you can place the <span> element either before or after the input element.
Write the ways to create a tabbed navigation menu in Bootstrap.
We can create tabbed navigation by making a basic unordered list with the base class of .nav and after this, we can add class .nav-tabs.
In Bootstrap, how can you create a pills navigation menu?
Pills navigation menu in bootstrap is created by making an unordered list at first with the base class of .nav and after this add the class .nav-pills.
Can you explain Bootstrap breadcrumb?
A Bootstrap breadcrumb is a great way to display hierarchy-based information for a website. Simply, it is an unordered list with a .breadcrumb class. CSS automatically adds the separator for a Bootstrap breadcrumb.
In blogs, the breadcrumb can display categories, publishing dates, or tags. It indicates the present page’s location within a navigational hierarchy.
How do you create and customize thumbnails in Bootstrap?
For creating thumbnails using Bootstrap, add a <a> tag with .thumbnail class around an image. It will add four pixels of padding as well as a gray border. When hovered, an animated glow outlines the image.
You can add any type of HTML content, such as buttons, headings, or paragraphs, into thumbnails. This is how to customize thumbnails using Bootstrap:
Change the <a> tag with .thumbnail class to a <div> tag Add anything that you need inside the <div> tag. You can use the default span-based naming convention for sizing Note: - If you wish to group multiple images then place them in an unordered list. Each list item will be floated to the left.
What do you understand by Bootstrap media objects?
Bootstrap media objects are abstract object styles for building different types of components, such as blog comments and Tweets, which feature either a left-aligned or right-aligned image and textual content.
The main aim of a Bootstrap media object is to make code required for developing blocks of information incredibly smaller. In order to achieve easy extensibility, lightweight markup, and other desirable aspects, classes are applied to some of the simple markups.
What purposes do the .media and .useful classes serve in Bootstrap?
The .media class allows a media object, such as audio, images, or video, to float to the left or right of a content block. For adding article lists or comment threads to an unordered list, we use the .useful class.
Can you explain the purpose of the Scrollspy plugin?
Using the Scrollspy plugin in Bootstrap allows you to target certain sections of the page based on the scroll position. Thereafter, you can add .active classes, based on the scroll position, to the Bootstrap navbar.
Please enumerate the various contextual classes available for styling the panels in Bootstrap.
Various contextual classes used in Bootstrap for styling the panels, i.e. making them more meaningful, are:
.panel-danger .panel-info .panel-primary .panel-success .panel-warning
How navbar works in Bootstrap?
In bootstrap, the navbar is an eminent feature to make a responsive meta component that works as navigation headers for your application and site. In the mobile view, the navbar collapses and becomes horizontal as the available viewport width increases.
How we can create a navbar in Bootstrap?
To create a navbar in a bootstrap at first, we have to add the classes .navbar, .navbar-default to the <nav> tag. After this, we have to add the role=” navigation” to the above element, and this will help inaccessibility.
We have added a header class .nav-header to the <div> element, which will include an <a> element with a class navbar brand. From this, we will get a text with a larger size.
What is Bootstrap breadcrumb?
Bootstrap breadcrumb is an efficient way to show hierarchy-based information for a site. This can show the dates of publishing, categories or tags in a blog. They also tell the user about the current page location within a navigational hierarchy.
So we can say that Bootstrap breadcrumb is simply an unordered list with a class of .breadcrumb.
What are labels in Bootstrap?
Bootstrap labels are used for offering counts, tips or other things to provide markup on web pages. To use the label in Bootstrap we use the class .labels to indicate the labels.
What are badges in Bootstrap?
Badges are homogeneous to labels, the main difference between them is corners are more rounded. The main work of badges in the bootstrap is to highlight new or unread items. To use badges just add <span class=”badge”> to links and bootstrap navs.
What is a jumbotron in Bootstrap?
It is used to increase the size of headings and to add a lot of margins for landing page content. To create a jumbotron we have to create a container <div> with the class of .jumbotron.
How can we make image responsive in Bootstrap?
After the updates in Bootstrap, currently the feature to make an image responsive has been added, we can do this by adding a class .img-responsive to the <img> tag. This class makes the width max-width =100%; and height=auto; to the image so that it matches nicely to the parent element.
What do you mean by normalize in Bootstrap?
Bootstrap normalize is a small CSS file that is used to make cross-browser consistency.
What is lead body copy in Bootstrap?
It is used to add some ascent to the paragraph if we add class=”lead”. This will enlarge the font size and taller line-height.
Explain the concept of creating a vertical or basic form in Bootstrap.
For this first we have to add a role form to the parent <form> element then we have to wrap labels and controls in a <div> with class.form-group and then we have to add a class of .form-control to all text url <input>,<textarea> and <select> elements.