Bootstrap Interview Questions and Answers

Q.1. Explain what is Bootstrap?
A.Bootstrap is a HTML, CSS, and JS framework for building the rich web applications with minimal effort. This framework emphasis more on building mobile web applications.
Q.2.Explain why to choose Bootstrap for building the websites?
A.There are few reason why we choose Bootstrap for building websitesMobile Support: For mobile devices it provides full support in one single file rather than in separate file. It supports the responsive design including adjusting the CSS based on the different types of device, size of the screen etc. It reduces extra effort for developers.

  • Easy to learn: Writing application in bootstrap is easy if you know CSS and HTML
  • Browser Support: It supports all the popular browsers like Firefox, Opera, Safari, IE etc.
Q.3.What are the key components of Bootstrap?
A.The key components of Bootstrap are

  • CSS : It comes with plenty of CSS files
  • Scaffolding : It provides a basic structure with Grid system , link styles and background
  • Layout Components : List of layout components
  • JavaScript Plugins: It contains many jQuery and JavaScript plugins
  • Customize: To get your own version of framework you can customize your components
Q.4.Explain what are class loaders in Bootstrap?
A.Class loader is a part of JRE (Java Runtime Environment) which loads Java classes into Java virtual environment. Class loaders also does the process of converting a named class into its equivalent binary form.
Q.5.What are the types of layout available in Bootstrap?
A.In Bootstrap there are two types of Layout available

  • Fluid Layout: Fluid layout is used when you want to create a app that is 100% wide and use up all the width of the screen
  • Fixed Layout: For a standard screen you will use fixed layout (940 px) option
Q.6.Explain what is Bootstrap Grid System?
A.In Bootstrap there are two types of Layout available
For creating page layout through a series of rows and columns that house your content Bootstrap Grid Sytem is used.
Q.7.What are offset columns in Bootstrap?
A.For more specialized layouts offsets are a useful feature. For more spacing they can be used by pushing column over. For example, .col-xs=* classes do not support offset but they are easily replicated using an empty cell
Q.8.What is column ordering in Bootstrap?
A. Column ordering is one of the feature available in bootstrap and you can easily write columns in an order and show them in another one. With .col-md-push-* and .col-md-pull-* the order of the column can be easily changed.
Q.9.What function you can use to wrap a page content?
A. To wrap a page content you can use .container and using that you can also center the content.
Q.10.Explain what pagination in bootstrap is and how they are classified?
A.

  • .pagination: To get pagination on your page you have to add this class
  • .disabled, .active: Customize links by .disabled for unclickable links and .active to indicate the current page
  • .pagination-Ig, .pagination-sm: Use these classes to get different size item
Q.11.What is the use of Jumbotron in Bootstrap?
A.
In bootstrap, Jumbotron is generally used for content that you want to highlight like some slogan or marketing headline etc. in other words it is used to enlarge the size of the headings and to add a margin for landing page content
To use the Jumbotron in Bootstrap
Create a container <div>with the class of .jumbotron
Q.12. Explain what are the steps for creating basic or vertical forms?
A.

  • Add a role form to the parent <form> element
  • Wrap labels and controls in a <div> with class .form-group. To achieve optimum spacing this is needed
  • Add a class of .form-control to all texturl <input> , <textarea> , and <select> elements
Q.13.Explain what is Bootstrap collapsing elements?
A.Bootstrap collapsing elements enables you to collapse any particular element without writing any JavaScript code or the accordion markup. In Bootstrap to apply collapsing elements you have to add data-toggle= “collapse” to the controller element along with a data-target or href to automatically assign control of a collapsible element. Likewise, you can use .collapse (options), .collapse (‘show’) or .collapse (‘hide’).
Q.14.Explain what is list group in Bootstrap and what is the use of it?
A.List groups are components to display both simple and complex element with custom content
For example, a simple list group is created using class .list-group to address the list, and class .list-group-item to address individual item.
Q.15.Explain what media object in Bootstrap is and what are their types?
A.Media objects in Bootstrap enables to put media object like image, video or audio to the left or right of the content blocks. Media element can be created using the class .media and the source is specified in using the class .media-object. Media-objects are of two types,
They are of two types

  • media
  • media-list
Q.16.Explain what is Bootstrap well?
A.  Bootstrap well is a container <div> that makes the content to appear sunken or an inset effect on the page. In order to create a well, wrap the content that you would like to appear in the well with a <div> containing the class of .well.
Q.17.Explain how you can create Nav elements in Bootstrap?
A.  Bootstrap offers various options for styling navigation elements all of them use the same markup and base class .nav.
To create Tabular Navigation or Tabs

  • Start with a basic unordered list with the base class of .nav
  • Then add class .nav-tabs
Q.18.Explain what is the use of Bootstrap Carousel plugin?
A.The Carousel plugin is used to add a slider to your site. It is useful in condition where you want to display huge amount of contents within a small space on the web pages. Some of the standard carousel includes

  • .carousel (options)
  • .carousel (‘cycle’)
  • .carousel (‘pause’)
  • .carousel (‘number’)
  • .carousel (‘prev’)
  • .carousel (‘next’)
Q.19.Explain the typography and links in Bootstrap.
A.Bootstrap sets a basic global display (background), typography, and link styles:

  • Basic Global display − Sets background-color: #fff; on theelement
  • Typography − Uses the @font-family-base, @font-size-base, and @line-height-base attributes as the typographic base
  • Link styles − Sets the global link color via attribute @link-color and apply link underlines only on :hover.
Q.20.What is bootstrap breadcrum?
A.21.Breadcrumbs are a great way to show hierarchy-based information for a site. In the case of blogs, breadcrumbs can show the dates of publishing, categories, or tags. They indicate the current page’s location within a navigational hierarchy.
A breadcrumb in Bootstrap is simply an unordered list with a class of .breadcrumb. The separator is automatically added by CSS (bootstrap.min.css).
Q.21.What are bootstrap panels.
A.Panel components are used when you want to put your DOM component in a box. To get a basic panel, just add class .panel to the element. Also add class .panel-default to this element.
Q.22.What is bootstrap breadcrum?
A..Breadcrumbs are a great way to show hierarchy-based information for a site. In the case of blogs, breadcrumbs can show the dates of publishing, categories, or tags. They indicate the current page’s location within a navigational hierarchy.
A breadcrumb in Bootstrap is simply an unordered list with a class of .breadcrumb. The separator is automatically added by CSS (bootstrap.min.css).
Q.23.What is Bootstrap Jumbotron?
A.As the name suggest this component can optionally increase the size of headings and add a lot of margin for landing page content. To use the Jumbotron.

  • Create a container
    with the class of .jumbotron.
  • In addition to a larger<h1>, the font-weight is reduced to 200px.
Q.24.Why Bootstrap is used for Mobile Web development?
A.It is used for Mobile Web development because it has responsive designs and templates which are easy to use.
Q.25.Explain the features of Bootstrap.
A. Its features include:

  • Open source for use
  • Compatibility with all browsers.
  • Responsive designs
  • Easy to use and fast.
Q.26.What do you mean by Bootstrap Classloader?
A. Bootstrap class loader is a part of java and a main parental class of class loader.
Q.27.Define Fixed Layout.
A. 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.
Q.28.Define Fluid Layout.
A. 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.
Q.29.How can you display code in Bootstrap?
A. You can display the code in two ways i.e. by using the <code>tag and by using the <pre>tag.
Q.30.When will you use <code>tag and <pre>tag?
A. <code>tag is used to show the code inline and <pre>tag is used to show code with multiple lines.
Q.31.What is a progress bar in bootstrap?
A. 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.
Q.32.Name the contextual classes that are used with the progressive bar in bootstrap.
A. The contextual classes used with progressive bar are as follows.

  • Progress-success
  • Progress-info
  • Progress-warning
  • Progress-danger
Q.33.What are responsive utility classes in Bootstrap?
A. 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
Q.34.What are the different button styles in Bootstrap?
A. 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.
Q.35.What are Bootstrap alerts?
A. This is used to create presume alert messages, which adds style to the messages to look more noticeable to the user.