Home » Bootstrap MCQ (Multiple Choice Questions)

Bootstrap MCQ (Multiple Choice Questions)

by Online Tutorials Library

Bootstrap MCQ

1) Who developed the bootstrap?

  1. James Gosling
  2. Mark Jukervich
  3. Dennis Ritchie
  4. Mark Otto and Jacob Thornton

Answer: (d) Mark Otto and Jacob Thornton

Explanation: Mark Otto and Jacob Thornton developed bootstrap at Twitter. It was released as an open-source product in August 2011 on GitHub.


2) Is Bootstrap3 mobile-first?

  1. True
  2. False
  3. Can’t say
  4. May be

Answer: (a) True

Explanation: Bootstrap 3 is the most stable version of Bootstrap, and it is still supported by the team for critical bugfixes and documentation changes. Bootstrap is more than efficient to create a responsive and mobile-first website.


3) Which of the following class in Bootstrap is used to provide a responsive fixed width container?

  1. .container-fixed
  2. .container-fluid
  3. .container
  4. All of the above

Answer: (c) .container

Explanation: In Bootstrap, a container is used to set the content’s margins dealing with the responsive behaviors of your layout. The .container class is used to create boxed content.


4) How many columns are allowed in a bootstrap grid system?

  1. 2
  2. 12
  3. 3
  4. 5

Answer: (b) 12

Explanation: The Bootstrap Grid System allows up to 12 columns across the page. You can use all 12 columns individually, or you can groups the columns together to create wider columns.


5) Which of the following class in bootstrap is used to create a big box for calling extra attention?

  1. .box
  2. .container
  3. .container-fluid
  4. .jumbotron

Answer: (d) .jumbotron

Explanation: A Bootstrap jumbotron specifies a big box for getting extra attention to some special content or information. It is displayed as a grey box with rounded corners. It can also enlarge the font sizes of the text inside it. The class .jumbotron within the <div> element is used to create a jumbotron.


6) The correct syntax of creating a standard navigation bar is –

  1. <nav class=”navigationbar navbar”>
  2. <nav class=”navbar navbar-default”>
  3. <nav class=”nav navbar”>
  4. <nav class=”navbar default”>

Answer: (b) <nav class=”navbar navbar-default”>

Explanation: A navigation bar is like a navigation header that is placed at the top of the page. You can collapse or extend it according to the screen size. You can create a standard navigation bar at the top of the page with <nav class=”navbar navbar-default”>.


7) Which of the following is the correct syntax of creating a standard navigation tab?

  1. <ul class=”navigation nav-tabs”>
  2. <ul class=”nav tab”>
  3. <ul class=”nav nav-tabs”>
  4. <ul class=”navigation tabs”>

Answer: (c) <ul class=”nav nav-tabs”>

Explanation: We can create a basic navigation tab with <ul class=”nav nav-tabs”>.


8) Which of the following class is used to create a black navigation bar?

  1. .navbar-default
  2. .navbar-inverse
  3. .navbar-black
  4. .navbar-dark

Answer: (b).navbar-inverse

Explanation: Inverted navigation bar provides an alternative black navbar. It can be used to style the default navigation bar by changing .navbar-default class into .navbar-inverse class.


9) The plugin used to create a cycle through elements as a slideshow is –

  1. slideshow
  2. scrollspy
  3. carousel
  4. None of the above

Answer: (c) carousel

Explanation: The Bootstrap carousel is a flexible, responsive way that is used to add a slider to your webpage. The carousel plugin is a component for cycling through an element, like a slideshow. If you want to add plugin functionality individually, then you have to use carousel.js file or all at once (using “bootstrap.js” or “bootstrap.min.js”).


10) Which of the following class in Bootstrap is used to create a dropdown menu?

  1. .dropdown
  2. .select
  3. .select-list
  4. None of the above

Answer: (a) .dropdown

Explanation: Dropdown menus are toggleable, contextual menus, used for displaying links in a list format. It facilitates users to choose one value from a predefined list. We have to wrap dropdown menu within the class .dropdown to create Bootstrap Dropdown.


11) Which of the following class in Bootstrap is used to create a basic list group?

  1. .grouped-list
  2. .select-list
  3. .list-group
  4. .list-grouped

Answer: (c) .list-group

Explanation: The class “.list-group” within the <ul> element and the class “.list-group-item” within the <li>element are used to create a basic list group. Bootstrap list group is used to create a group of list with list items.


12) The class used to shape an image to a circle is –

  1. .img-rounded
  2. .img-circle
  3. .img-rounded
  4. None of the above

Answer: (b) .img-circle

Explanation: The class .img-circle is used to shape the image into a circle (IE8 does not support rounded corners).


13) Which of the following class in Bootstrap is used to add a zebra-stripe to a table?

  1. .tab-striped
  2. .zebra-strip
  3. .table-stripped
  4. .table-striped

Answer: (d) .table-striped

Explanation: We can create different types of Bootstrap tables by using different classes to style them. The .table-striped class is used to add zebra-stripes to a table.


14) Which of the following class in Bootstrap is used to create a large button?

  1. .btn-xl
  2. .btn-lrg
  3. .btn-large
  4. .btn-lg

Answer: (d).btn-lg

Explanation: We can use the .btn-lg class in bootstrap to create a large button.


15) Which of the following plugin in Bootstrap is used to create a modal window?

  1. popup
  2. alert
  3. modal
  4. window

Answer: (c) modal

Explanation: The bootstrap modal plugin is a dialog box/popup window that is displayed on top of the current page.


16) Which of the following class in Bootstrap is used to create basic pagination?

  1. .page
  2. .pagin
  3. .paginate
  4. .pagination

Answer: (d) .pagination

Explanation: Pagination is used to sort the web pages of your website in an organized manner. It becomes very necessary if your website has a lot of web pages. We can add the .pagination class to get the pagination on our page.


17) Which of the following class in Bootstrap is used to create a badge?

  1. .tag
  2. .badge
  3. .page
  4. .flag

Answer: (b) .badge

Explanation: Bootstrap Badges are numerical indicators used to show that how many items are associated with the specific link. Badges are used to highlight new or unread items. The class .badge within the element is used to create badges.


18) The class in Bootstrap used to provide rounded corners to the image is –

  1. .img-circle
  2. .image-circle
  3. .image-rounded
  4. .img-rounded

Answer: (d) .img-rounded

Explanation: The class .img-rounded is used to add rounded corners to an image (IE8 does not support rounded corners). It adds border-radius: 6px to give the image rounded corners.


19) Which of the following class in Bootstrap is used to create a panel?

  1. .panel
  2. .container
  3. .box
  4. .jumbotron

Answer: (a) .panel

Explanation: In Bootstrap, a panel is a bordered box with some padding around its element. The class .panel is used within the <div> element to create Bootstrap panels.


20) Using which of the following, we can create a pager in Bootstrap?

  1. .carousel
  2. .collapse
  3. .pager
  4. None of the above

Answer: (c) .pager

Explanation: Bootstrap pager is a form of pagination. The “.pager” class is used within the <ul> element to create the previous / next buttons. It is used to create previous and next buttons (links).


21) The class in Bootstrap which is used to specify the collapsible elements is –

  1. .collapse
  2. .carousel
  3. .pager
  4. None of the above

Answer: (a) .collpase

Explanation: Bootstrap collapse is used when you want to hide and show a large amount of content. The “.collapse” class is used to specify the collapsible element.


22) Which of the following class in Bootstrap is used to create a well?

  1. .wel
  2. .well
  3. .well-container
  4. .container-well

Answer: (b) .well

Explanation: In Bootstrap, wells are used to add a rounded border around an element with a gray background color and some padding. It is like a container that displays the content. The class .well is used with <div> element to add well.


23) The class used for creating the large size wells is –

  1. .well-large
  2. .well-big
  3. .well-lg
  4. .well-sm

Answer: (c) .well-lg

Explanation: By default, the size of the wells is medium, but you can change the size of the well according to your need. The “.well-lg” class is used for large wells.


24) The class used for creating the small size wells is –

  1. .well-small
  2. .well-short
  3. .well-lg
  4. .well-sm

Answer: (d) .well-sm

Explanation: By Default, wells size is medium, but you can change the size of the well according to your need. The .well-sm class is used for small wells.


25) Which of the following class in Bootstrap is used for creating the large size modals?

  1. .modal-large
  2. .modal-sm
  3. .modal-big
  4. .modal-lg

Answer: (d) .modal-lg

Explanation: We can use the .modal-lg class for large modals. The size class is added to the <div> element with class .modal-dialog.


26) Which of the following class in Bootstrap is used for creating the small size modals?

  1. .modal-large
  2. .modal-sm
  3. .modal-big
  4. .modal-lg

Answer: (b) .modal-sm

Explanation: We can use the .modal-sm class for creating the small modals. The size class is added to the <div> element with class .modal-dialog.


27) Which of the following class in Bootstrap is used to indicate the uppercased text?

  1. .text-capitalize
  2. .text-upper
  3. .uppercase
  4. .text-uppercase

Answer: (d) .text-uppercase

Explanation: We can use the “.text-uppercase” class to make the text appear in uppercase.


28) Which of the following plugin is used to create a tooltip?

  1. popover
  2. tooltip
  3. modal
  4. None of the above

Answer: (b) tooltip

Explanation: Tooltips are a great way to display extra information about something when the user moves the mouse cursor over an element.


29) Which of the following is the correct syntax to insert search icon?

  1. <span class = “glyph glyphicon-search”> </span>
  2. <span class = “glyphicon glyph-search”> </span>
  3. <span class = “glyphicon glyphicon-search”> </span>
  4. <span class = “glyphicon-search”> </span>

Answer: (c) <span class = “glyphicon glyphicon-search”> </span>

Explanation: Glyphicons are the icon fonts that are used in web projects. Bootstrap provides 260 Glyphicons from the Glyphicons Halflings set. The correct syntax of inserting the search icon using Bootstrap is: <span class = “glyphicon glyphicon-search”> </span>


30) Which of the following class is used to add a heading to the panel?

  1. .panel-head
  2. .panel-header
  3. .panel-heading
  4. .panel-content

Answer: (c) .panel-heading

Explanation: In Bootstrap, a panel is a bordered box with some padding around its element. The .panel-heading class is used to add a heading to the panel.


31) Which of the following is correct method to add a success button?

  1. <button class = “btn btn-success”> success </button>
  2. <button class = “btn button-success”> success </button>
  3. <button class = “button btn-success”> success </button>
  4. <button class = “button btn-primary”> success </button>

Answer: (a) <button class = “btn btn-success”> success </button>

Explanation: There are various styles to add a button in Bootstrap. The syntax for creating a success button in Bootstrap is: <button class = “btn btn-success”> success </button>.


32) Which of the following class in Bootstrap is used to create a label?

  1. .label
  2. .badge
  3. .flag
  4. .popover

Answer: (a) .label

Explanation: Bootstrap labels are used to specify the additional information about something like offering counts, tips, or other makeup for pages. The class .label is used to display the labels.


33) Is it true that the Bootstrap grid system works across multiple devices?

  1. True
  2. False
  3. Can’t say
  4. May be

Answer: (a) True

Explanation: Bootstrap Grid System is responsive, and the columns are re-arranged automatically according to the screen size. The Bootstrap Grid System allows up to 12 columns across the page. You can use all 12 columns individually, or you can groups the columns together to create wider columns.


34) Glyphicons in Bootstrap are used for –

  1. Using different icons on a webpage such as print, envelope, etc.
  2. Removing different icons on the page
  3. Selecting different icons on the page
  4. None of the above

Answer: (a) Using different icons on a webpage such as print, envelope, etc.

Explanation: None


35) What is the default layout of the Bootstrap form?

  1. Horizontal
  2. Inline
  3. Vertical
  4. None of the above

Answer: (c) Vertical

Explanation: In Bootstrap, there are three types of form layouts that are – vertical, horizontal, and inline. The default layout of the Bootstrap form is vertical.


36) Which of the following class indicates the capitalized text?

  1. .text-capitalize
  2. .text-upper
  3. .uppercase
  4. .text-uppercase

Answer: (a) .text-capitalize

Explanation: We can use the “.text-capitalize” class to make the text appear in uppercase.


37) The class used to right align the navigation bar buttons is –

  1. .navbar-rgt
  2. .navbar-btn
  3. .navbar-right
  4. .navbar-default

Answer: (c) .navbar-right

Explanation: The .navbar-right class is used to right-align the navigation bar buttons.


38) Which of the following class is used to create a thumbnail image?

  1. .img-circle
  2. .img-nail
  3. .img-thumb
  4. .img-thumbnail

Answer: (d) .img-thumbnail

Explanation: The class .img-thumbnail is used to shape an image into a thumbnail. It adds a bit of padding and a gray border.


39) Which of the following class in Bootstrap is used to create a button as a link?

  1. .btn-anchor
  2. .btn-link
  3. .btn-hyperlink
  4. None of the above

Answer: (b) .btn-link

Explanation: There are various styles of the button are available in Bootstrap. By using the .btn-link class, we can create a button as a link.


40) Which of the following grid class in Bootstrap is used for desktops?

  1. xs
  2. sm
  3. lg
  4. md

Answer: (d) md

Explanation: Basically, there are four classes in Bootstrap grid system that is xs, sm, md, and lg. From these classes, we can use the md class for the devices like desktops.


41) The class “xs” in Bootstrap is used for –

  1. tablets
  2. phones
  3. desktop
  4. All of the above

Answer: (b) phones

Explanation: Basically, there are four classes in Bootstrap grid system that is xs, sm, md, and lg. The xs class is used for small devices such as phones.


42) Which of the following class in Bootstrap is used to create an animated progress bar?

  1. .active
  2. .progress-success
  3. .progress-active
  4. None of the above

Answer: (a) .active

Explanation: The progress bar shows how far a user is in a process. In Bootstrap, there are several types of progress bars. The class .active is used to create an animated progress bar.


43) Which of the following statement is correct about the Bootstrap wells?

  1. By default, the size of wells is medium.
  2. Using .well-sm and .well-lg classes, we can change the size of wells.
  3. The .well-sm class is for small wells, and the .well-lg class is for large wells. And both classes should be used in conjunction with .well class.
  4. All of the above

Answer: (d) All of the above

Explanation: The class .well is used with

element to add well. By Default, wells size is medium, but you can change the size of the well according to your need. The .well-sm class is used for small wells, and the .well-lg class is used for large wells.

44) Which of the following is correct about the Bootstrap Grid system?

  1. The Bootstrap Grid system allows 12 columns across the page.
  2. Bootstrap Grid system is responsive.
  3. Both (a) and (b)
  4. Neither (a) nor (b)

Answer: (c) Both (a) and (b)

Explanation: The Bootstrap Grid System allows up to 12 columns across the page. You can use all 12 columns individually, or you can groups the columns together to create wider columns. Bootstrap Grid System is responsive, and the columns are re-arranged automatically according to the screen size.


45) Which of the following statement is true about jumbotron in Bootstrap?

  1. The .jumbotron class is used to create a jumbotron.
  2. It is generally used for getting extra attention. It enlarges the font-size of the text inside it.
  3. Both (a) and (b)
  4. Neither (a) nor (b)

Answer: (c) Both (a) and (b)

Explanation: A Bootstrap jumbotron specifies a big box for getting extra attention to some special content or information. It is displayed as a grey box with rounded corners. It can also enlarge the font sizes of the text inside it. The class .jumbotron within the <div> element is used to create a jumbotron.


46) Which of the following statement is true about responsive images in Bootstrap?

  1. We can use the .img-responsive class to the <img> tag to create responsive images.
  2. The responsive images adjust themselves automatically to fit according to the screen size.
  3. Both (a) and (b)
  4. Neither (a) nor (b)

Answer: (c) Both (a) and (b)

Explanation: The responsive images can adjust themselves automatically to fit the size of the screen. You can create responsive images by adding an .img-responsive class to the <img> tag. The image will then scale nicely to the parent element. The .img-responsive class applies display: block; and max-width: 100%; and height: auto; to the image.


47) Which of the following set of classes in the Bootstrap grid system used to define the screen size?

  1. small, xs, lg, extra-large
  2. xs, medium, lg, sm
  3. sm, mg, lg
  4. xs, sm, md, lg

Answer: (d) xs, sm, md, lg

Explanation: Basically, there are four classes in Bootstrap Grid System that are listed below:

  • xs (for phones)
  • sm (for tablets)
  • md (for desktops)
  • lg (for larger desktops)

We can combine the above classes to create more dynamic and flexible layouts.


48) Which of the following class in Bootstrap is used to style a table with borders surrounding every element?

  1. .table-striped
  2. .table-bordered
  3. .table-border
  4. .table-condensed

Answer: (b) .table-bordered

Explanation: The .table-bordered class is used to add borders on all sides of the table and cells.


49) Which of the following class in Bootstrap is used to style a table with a light gray background to rows when the user moves the cursor over them?

  1. .table-striped
  2. .table-bordered
  3. .table-border
  4. .table-hover

Answer: (d) .table-hover

Explanation: The .table-hover class is used to enable a hover state on table rows.


50) The scrollspy plugin in Bootstrap automatically updates the links in a navigation list based on scroll position –

  1. True
  2. False
  3. Can’t say
  4. May be

Answer: (a) True

Explanation: The Bootstrap Scrollspy plugin is used to automatically update links in a navigation list based on scroll position.


Next TopicBootstrap Tutorial

You may also like