Bootstrap Online Test Questions Part 3

13. Which class is used to create warning notification alerts in Bootstrap?

a. .alert-danger
b. .alert-warning
c. .alert-info
d. .alert-success

Answer: b. .alert-warning

Explanation: In Bootstrap, we can create predefined alert messages easily. Alerts are created with the .alert class followed by four contextual classes .alert-success, .alert-info, .alert-warning or .alert-danger.


14. Which class is used to create a button as a link in bootstrap?

a. .btn-hyperlink
b. .btn-link
c. .btn-url
d. .btn-anchor

Answer: b. .btn-link

Explanation: Bootstrap provides several predefined button styles, each serving its own semantic purpose.
E.g. .btn-link class is used to create a button as a link in bootstrap.


15. Badges can also be used inside button elements.

a. True
b. False

Answer: a. True

Explanation: Badges are numerical indicators of how many items are associated with a link. Badges can also be used inside the button elements.

<button type="button" class="btn btn-primary">Primary <span class="badge">5</span></button>


16. The _________ class is used to right-align navigation bar buttons.

a. .navbar-default
b. .navbar-btn
c. .navbar-right
d. .navbar-rgt

Answer: c. .navbar-right

Explanation: The .navbar-right class is used to right-align navigation bar button in Bootstrap.


17. Which class is used to add buttons inside the navigation bar?

a. .navbar-default
b. .navbar-btn
c. .navbar-button
d. .navbar-right

Answer: b. .navbar-btn

Explanation: In Bootstrap, to add a button inside the navbar, we put .navbar-btn class on a button.


18. Which of the following class is used to create thumbnail image?

a. .img-tmbnail
b. .img-thumb
c. .img-thumbnail-image
d. .img-thumbnail

Answer: d. .img-thumbnail

Explanation: In Bootstrap the .img-thumbnail class is used to shape an image to a thumbnails.