Bootstrap Interview Questions Part 3

Bootstrap Interview Questions Part 2

Bootstrap – Interview Questions

What are Bootstrap media queries?

Media Queries in Bootstrap allow you to move, show and hide content based on viewport size.


Show a basic grid structure in Bootstrap.

Following is basic structure of Bootstrap grid −


What are Offset columns?

Offsets are a useful feature for more specialized layouts. They can be used to push columns over for more spacing, for example. The .col-xs = * classes don’t support offsets, but they are easily replicated by using an empty cell.


How can you order columns in Bootstrap?

You can easily change the order of built-in grid columns with .col-md-push-* and .col-md-pull-* modifier classes where * range from 1 to 11.


How do you make images responsive?

Bootstrap 3 allows to make the images responsive by adding a class .img-responsive to the <img> tag. This class applies max-width: 100%; and height: auto; to the image so that it scales nicely to the parent element.


Explain the typography and links in Bootstrap.

Bootstrap sets a basic global display (background), typography, and link styles −

  • Basic Global display − Sets background-color: #fff; on the <body> element.
  • 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.

What is Normalize in Bootstrap?

Bootstrap uses Normalize to establish cross browser consistency.

Normalize.css is a modern, HTML5-ready alternative to CSS resets. It is a small CSS file that provides better cross-browser consistency in the default styling of HTML elements.


What is Lead Body Copy?

To add some emphasis to a paragraph, add class = “lead”. This will give you larger font size, lighter weight, and a taller line height


Explain types of lists supported by Bootstrap.

Bootstrap supports ordered lists, unordered lists, and definition lists.

  • Ordered lists − An ordered list is a list that falls in some sort of sequential order and is prefaced by numbers.
  • Unordered lists − An unordered list is a list that doesn’t have any particular order and is traditionally styled with bullets. If you do not want the bullets to appear then you can remove the styling by using the class .list-unstyled. You can also place all list items on a single line using the class .list-inline.
  • Definition lists − In this type of list, each list item can consist of both the <dt> and the <dd> elements. <dt> stands for definition term, and like a dictionary, this is the term (or phrase) that is being defined. Subsequently, the <dd> is the definition of the <dt>.

You can make terms and descriptions in <dl> line up side-by-side using class dl-horizontal.