Bootstrap Interview Questions and Answers

1. What do you understand by Bootstrap?

Bootstrap, originally named Twitter Blueprint, was developed by Mark Otto and Jacob Thornton at Twitter, is free and open source front end Javascript web framework for designing the rich, sleek, intuitive web applications with minimal effort. This framework is more useful for building mobile based web applications. It uses HTML, Javascript and CSS based design templates and other interface components. It also has optional JavaScript extensions.

2. Why would you use Bootstrap? Tell me about its benefits.

The major benefits of using Bootstrap are-

  • It is a free and open-source Web Designing Framework
  • It has support of all the web browsers like Internet Explorer, Google Chrome, Firefox, Opera, Safari etc.
  • It is a very powerful mobile first front-end framework
  • It is very easy to start as one needs to have idea of HTML and CSS only to work with it
  • We can design responsive website through it which adjust to desktop, tablet and mobile
  • It comprises functional built-in components which are easy to customize
3. Which components are there in Bootstrap?

Main components of Bootstrap are-

  • Reusable Components : It contains plenty of reusable layout components
  • CSS : It contains lots of CSS files
  • jQuery & JavaScript Plugins: It comprises many jQuery and JavaScript plugins
  • Scaffolding : It comes with a basic structure with link styles, grid system and background
  • Customization: You have a freedom to customize components as per your wish

4. Tell me about different layouts available in Bootstrap.

Two layouts are available in Bootstrap-
1. Fluid Layout-Its design automatic adjusts to the browser size.
2. Fixed Layout-Its design doesn't adjust automatically to different browsers but it can be responsive.

5. Could you explain me about responsive layout?

Responsive layout's design automatic adjusts to the browser size but when resizing, the number of columns changes according to the space available.

6. Would you differentiate between Fluid Layout & Responsive Layout?

Yes, sure. The main difference is that Fluid Layout are built using widths percentages and they are based on proportionally laying out the website so elements take up the same percent of space on different screen sizes. Responsive Layout is built on a fluid grid and here CSS Media Queries are used to present different layouts based on different screen sizes.

7. How the images are made responsive?

In order to make the images responsive, we need to add a class .img-responsive to the tag. This class sets maximum width equal to 100%, and height to auto adjustable to the image.

8. Tell me about Bootstrap Media Queries?

Bootstrap Media Queries are CSS techniques which are introduced in CSS3 that allow the designer to show, hide and move contents according to the size of viewport. @media is used to include a bunch of CSS properties if a certain condition is true.

9. Would you explain Bootstrap Grid System?

Bootstrap Grid System is used for creation of page layout in rows & columns to store the contents. It can adjust up to 12 columns according to increase in the size of the device or viewport. Predefined grid classes have been included in Bootstrap 3 for designing different grid layouts for different devices like mobiles, tablets, desktops and laptops.

10. Do you have an idea as to why Modal Plugin is used in Bootstrap?

Modal Plugin is used to create modal window to add more functionalities for the user. A modal is a child window that is layered over its parent window. We can create Bootstrap Modal using a custom jQuery Plugin.