10 Essential Twitter Bootstrap Interview Questions *

Toptal sourced essential questions that the best Twitter Bootstrap developers and engineers can answer. Driven from our community, we encourage experts to submit questions and offer feedback.

Hire a Top Twitter Bootstrap Developer Now
Toptal logois an exclusive network of the top freelance software developers, designers, finance experts, product managers, and project managers in the world. Top companies hire Toptal freelancers for their most important projects.

Interview Questions


Explain what the following code does, and where they are useful:

<a href="#">Home <span class="badge">36</span></a>
View answer

This code will generate a link with an inline badge that provides important notifications to the user, such as number received or unread messages or number of friend requests. Badges are most commonly used in message applications and social networking sites.


Consider the HTML code snippet below.

<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Example tooltip">Hover over me</button>

What is missing for a tooltip to show properly?

View answer

Bootstrap’s Tooltip plugin is not CSS-only, like other plugins are. For performance reasons, the Tooltip plugin is opt-in, and to use it you must initialize it using JavaScript with the following example code:

$(function () {

What is the difference between the following two lines of code?

$('#myModalPrompt').modal({ keyboard: false });
$.fn.modal.Constructor.DEFAULTS.keyboard = false;

Explain your answer.

View answer

The first line will initialize a modal dialog prompt with id #myModalPrompt, and set only it to ignore keyboard event. The second line will change the default settings for the modal plugin by modifying the plugin’s Constructor.DEFAULTS object, and will have an impact on all modal dialog prompts.

Apply to Join Toptal's Development Network

and enjoy reliable, steady, remote Freelance Twitter Bootstrap Developer Jobs

Apply as a Freelancer

Consider the HTML code snippet below. What will the output be, and why?

<div class="progress">
  <div class="progress-bar progress-bar-success" style="width: 65%">
    <span class="sr-only">65% sucesfuly completed</span>
  <div class="progress-bar progress-bar-warning" style="width: 20%">
    <span class="sr-only">20% completed with warnings</span>
  <div class="progress-bar progress-bar-danger" style="width: 15%">
    <span class="sr-only">15% did not complete</span>
View answer

By placing multiple bars under the same .progress parent element, Bootstrap will stack them into one single progress bar. Since the sum of the progress bar is 100%, the progress bar will be full width and fully populated.


What will be the default Bootstrap look of the alert created with this following code:

<div class="alert" role="alert">Warning! I'm missing something.</div>
View answer

Alert messages are used to provide feedback message that usually require the attention of the user. Here it is important to note that Bootstrap Alerts don’t have default class. If a contextual class such as .alert-success, .alert-info, .alert-warning, or .alert-danger, is not provided, a default gray alert will be created.


What will be the output of the following HTML code:

<ul class="list-unstyled">
  <li>Item 1</li>
  <li>Item 2</li>
      <li>Nested item 2.1</li>
      <li>Nested item 2.2</li>
      <li>Nested item 2.3</li>
  <li>Item 3</li>

Explain your answer.

View answer

If we apply .list-unstyled to a list, it will remove the default list-style and left margin on the list items. But only for the immediate children. Main list items will be without any style, and nested list items will still have default unordered nested list-style.


What global styles are applied as a part of Bootstrap’s default typography?

View answer

Bootstrap sets the global default font-size to 14px, with a line-height of 1.428. The default font is changed to Helvetica and Arial with sans serif fallback. All these styles are applied to the <body> and all paragraphs, with the addition that <p> (paragraphs) receive a bottom margin of half their computed line-height, which is 10px by default.


Consider the following HTML code snippet:

<div class="row">
  <div class="col-xs-12 col-md-3">.col-xs-12 .col-md-3</div>
  <div class="col-xs-12 col-md-3">.col-xs-12 .col-md-3</div>
  <div class="col-xs-12 col-md-3">.col-xs-12 .col-md-3</div>
  <div class="col-xs-12 col-md-3">.col-xs-12 .col-md-3</div>

What will be the output of the following HTML code on mobile and on desktop view? Explain your answer.

View answer

.col-xs-* class defines the number of grids for extra small devices, and .col-md-* defines the number of grids for desktop devices and above. This example will render on the desktop with four columns, and on mobile the columns will have full width and will be stacked on each other.


How many different media queries are used by the Bootstrap grid system by default?

View answer

The Bootstrap grid system provides four tiers of classes: xs for phones (<768px), sm for tablets (≥768px), md for desktops (≥992px), and lg for large desktops (≥1200px). The hidden trick in this question is that there are only three media queries. Bootstrap is mobile first by design, so the default styles are for small devices, and media queries are then added on for larger screens, as follow in LESS code:

/* Extra small devices (phones, less than 768px) */
/* No media query since this is the default in Bootstrap */

/* Small devices (tablets, 768px and up) */
@media (min-width: @screen-sm-min) { ... }

/* Medium devices (desktops, 992px and up) */
@media (min-width: @screen-md-min) { ... }

/* Large devices (large desktops, 1200px and up) */
@media (min-width: @screen-lg-min) { ... }

What dependencies does Bootstrap require for it to work properly?

View answer

The only dependency that Bootsrap requires to work properly is jQuery, and this is only for Bootstrap’s JavaScript plugins. At the moment, Bootsrap v3.3.4 requires jQuery v1.9.1 or later.

There is more to interviewing than tricky technical questions, so these are intended merely as a guide. Not every “A” candidate worth hiring will be able to answer them all, nor does answering them all guarantee an “A” candidate. At the end of the day, hiring remains an art, a science — and a lot of work.

Why Toptal

Tired of interviewing candidates? Not sure what to ask to get you a top hire?

Let Toptal find the best people for you.

Hire a Top Twitter Bootstrap Developer Now

Our Exclusive Network of Twitter Bootstrap Developers

Looking to land a job as a Twitter Bootstrap Developer?

Let Toptal find the right job for you.

Apply as a Twitter Bootstrap Developer

Job Opportunities From Our Network

Submit an interview question

Submitted questions and answers are subject to review and editing, and may or may not be selected for posting, at the sole discretion of Toptal, LLC.

* All fields are required

Looking for Twitter Bootstrap Developers?

Looking for Twitter Bootstrap Developers? Check out Toptal’s Twitter Bootstrap developers.

Fernando Rivas

Freelance Twitter Bootstrap Developer
Toptal Member Since August 8, 2017

Fernando has over ten years of experience in front-end development, first working for his own company, then as a freelance and an employee, participating in a wide range of projects. Currently, he specializes in React + TypeScript/ES6, Jest and React tools testing Redux and SASS. He has experience with PHP, jQuery, and mobile web applications.

Show More

Juan Varela

Freelance Twitter Bootstrap Developer
Toptal Member Since April 19, 2017

Juan is a very passionate front-end and back-end web developer whose specialty is making beautiful and responsive UX focusing on usability and design. He has over a decade of experience working independently, at startups, and big companies/teams. He's worked on critical applications under immense time pressure. He is an amicable and communicative person who takes a lot of pride in his work.

Show More

Igor Santos

Freelance Twitter Bootstrap Developer
Toptal Member Since February 15, 2016

Igor is a web developer focused on modern PHP and JS, always striving for new technologies. When he wears his back-end hat, he's focused on performant and DRY code, working on API servers or consumers. When he gets his front-end hat on, he works heavily on maintaining the best UX he can make for his users.

Show More

Toptal Connects the Top 3% of Freelance Talent All Over The World.

Join the Toptal community.

Learn more