Bootstrap 5.3 · Practice test + 10 free questions · Updated November 2026
A Bootstrap 5 practice test checks how well you know the Bootstrap 5.3 toolkit: the grid and breakpoints, utility classes, forms and validation, components such as modals and offcanvas, the JavaScript plugin API, Sass customization and color modes. The latest Bootstrap 5 release is v5.3.8, while Bootstrap 6 is only in its first alpha (6.0.0-alpha.1, released on 8 October 2026), so Bootstrap 5.3 is the stable version to learn and test. The Bootstrap team offers no official certification, so a practice test or quiz is the most direct way to check your skills before an interview or job skills test. This page covers what a good practice test includes, who it suits, a 2–3 week plan and 10 free Bootstrap 5 practice questions with answers.
At a glance
| Topic | Bootstrap 5 (v5.3 docs) |
| Current stable release | v5.3.8 (25 August 2025) |
| Next major version | Bootstrap 6 alpha (8 October 2026) |
| Licence | MIT, open source |
| Official certification | None offered |
| Exametics set | 3 practice tests, 162 questions |
- Bootstrap 5 needs no jQuery. Its plugins are plain JavaScript, configured mostly with
data-bs-*attributes. - Many Bootstrap 4 classes, such as
.ml-3,.form-groupand.btn-block, no longer exist in Bootstrap 5.
Source: Bootstrap versions page, Bootstrap 5.3.8 release post and Bootstrap 6 Alpha announcement. Checked on 9 November 2026.
Want to test yourself first? Jump to the 10 free Bootstrap 5 practice questions with answers.
What a good Bootstrap 5 practice test covers
A good Bootstrap 5 practice test covers the whole toolkit as it works in version 5.3: layout, utilities, forms, components, JavaScript plugins and customization. It should also catch Bootstrap 4 habits, because many old class names silently do nothing in Bootstrap 5.
The Bootstrap 5.3 migration guide lists many renamed or dropped classes, and some 5.3 features, such as color modes, did not exist in 5.0. The same topics come up as Bootstrap 5 interview questions, so one practice test serves both goals.
Layout: grid, breakpoints and containers
Layout questions focus on the grid. The Bootstrap grid documentation describes a mobile-first flexbox grid with twelve columns and six default responsive tiers. A class for a breakpoint applies at that breakpoint and every larger one, so .col-sm-4 also applies on md, lg, xl and xxl screens.
Know the six default breakpoints by heart. The Bootstrap breakpoints page lists them as follows.
| Breakpoint | Class infix | Starts at |
|---|---|---|
| Extra small | None | Below 576px |
| Small | sm | 576px |
| Medium | md | 768px |
| Large | lg | 992px |
| Extra large | xl | 1200px |
| Extra extra large | xxl | 1400px |
Expect questions on Bootstrap gutters too. Gutters start at 1.5rem wide, and you change them with .gx-*, .gy-* and .g-*; .g-0 removes them. Also know .row-cols-*, .col-auto and the three container types.
Utilities: spacing, display and helpers
Utility questions check that you can read a class name and say exactly what it does. The spacing utilities page gives the pattern {property}{sides}-{size}, or {property}{sides}-{breakpoint}-{size} above xs. Sizes run from 0 to 5 plus auto. Size 3 equals $spacer (1rem by default) and size 5 equals $spacer * 3.
Bootstrap 5 uses logical sides: s for start and e for end. In a left-to-right page, start is the left side; in a right-to-left page, it is the right side. Display utilities follow the same breakpoint logic, so .d-lg-none hides an element on lg, xl and xxl screens.
Forms: controls, floating labels and validation
Form questions often trip up developers who learned Bootstrap 4. Bootstrap 5 dropped .form-group, .form-row and .form-inline in favour of the grid and utilities, and .custom-select became .form-select.
Floating labels have two strict rules. The floating labels page says each input needs a non-empty placeholder, and the <input> must come before the <label> inside .form-floating, because the CSS uses a sibling selector. Apart from .form-control, floating labels work only on .form-select.
Validation questions test when styles appear. According to the form validation page, Bootstrap scopes its :invalid and :valid styles to a parent .was-validated class. You add novalidate to the form to switch off the browser’s own tooltips, and you can use .is-valid and .is-invalid for server-side results.
Components and JavaScript plugins
Component questions focus on markup and behaviour: navbars, dropdowns, modals, offcanvas, tooltips, toasts and buttons. For example, the offcanvas documentation says there is no default placement, so you must add .offcanvas-start, .offcanvas-end, .offcanvas-top or .offcanvas-bottom.
The Bootstrap JavaScript guide covers data attributes (the preferred way), option names in kebab-case, getInstance() and getOrCreateInstance(), and events. Events come in pairs: show fires at the start of an action and shown when it finishes, and only the first kind supports preventDefault(), which stops the action before it starts.
Tooltips and popovers are a classic trap. The tooltips page says tooltips are opt-in for performance reasons, so you must initialise them yourself. Popper, which positions dropdowns, popovers and tooltips, is included in bootstrap.bundle.min.js but not in bootstrap.min.js.
Customization: Sass, CSS variables and color modes
Customization questions check that you can change Bootstrap without editing its source. The Sass customization page says every Sass variable has the !default flag, and variable overrides must come after Bootstrap’s functions are imported but before the rest of the imports. Its CSS variables all start with --bs-.
Color modes arrived in v5.3.0. The color modes page explains that you set data-bs-theme="light" or data-bs-theme="dark" on the <html> element for the whole page, or on a single component or wrapper. Dark mode does not switch on automatically, and Bootstrap ships no built-in color mode picker.
Bootstrap 4 classes that changed in Bootstrap 5
The official migration guide lists these common changes.
| Bootstrap 4 class or habit | Bootstrap 5.3 replacement |
|---|---|
.ml-* and .mr-* | .ms-* and .me-* |
.float-left and .float-right | .float-start and .float-end |
.no-gutters | .g-0 |
.form-group, .form-row, .form-inline | Grid and spacing utilities |
.custom-select | .form-select |
.btn-block | A .d-grid wrapper with a .gap-* utility |
.sr-only | .visually-hidden |
data-toggle | data-bs-toggle |
| jQuery | Not required; plugins are plain JavaScript |
Watch out
Old tutorials still teach Bootstrap 4 classes. In Bootstrap 5 they throw no error and simply have no effect, so the bug is easy to miss.
Exametics practice tests
Bootstrap 5 practice tests
- 3 practice tests of 54 questions (162 in total), including a timed Exam Mode test
- Every question explains the right answer and why the others are wrong, with a hint
- Each question tagged with one of nine topic areas; rebuilt in November 2026 against the Bootstrap 5.3 docs
- Lifetime access
30-day refund. Instant access after payment.
Who these Bootstrap 5 practice tests are for
These Bootstrap 5 practice tests are for front-end developers, web designers, students and job seekers who want to check their Bootstrap 5 skills. They suit anyone who uses Bootstrap at work, is moving a project from Bootstrap 4, or expects Bootstrap 5 interview questions or a skills test.
Use this table as a rough guide to what each level should handle.
| Level | What you should be able to do |
|---|---|
| Beginner or student | Build a responsive page with containers, rows and columns; use spacing, color and display utilities; style buttons, cards and alerts. |
| Junior developer | Build forms with validation and floating labels; use navbars, dropdowns, modals and offcanvas through data attributes; avoid Bootstrap 4 classes. |
| Mid-level or senior | Control plugins with the JavaScript API and events; customise Bootstrap with Sass and CSS variables; add color modes; trim unused CSS and JavaScript. |
Is there an official Bootstrap certification?
No. Bootstrap is an open-source toolkit released under the MIT licence, and the official Bootstrap website lists no certification or exam.
Bootstrap 5.3 or Bootstrap 6: which should you learn?
Learn Bootstrap 5.3 first. It is the current stable major version, and the Bootstrap team says Bootstrap 5 remains available and supported, with v5.4.0 planned before an end-of-life date is shared. Neither date has been published yet.
Bootstrap 6 is worth watching. The Bootstrap 6 Alpha announcement lists these main differences.
| Item | Bootstrap 5.3 | Bootstrap 6 (alpha) |
|---|---|---|
| Status | Stable; latest release v5.3.8 | First alpha, 6.0.0-alpha.1 (8 October 2026) |
| Browser support | Back to Chrome and Firefox 60, Safari 12 | Chrome and Edge 130, Firefox 132, Safari 18 |
| JavaScript | Bundle via a normal script tag; ESM build also available | ESM-only; the script tag needs type="module" |
| Responsive classes | Breakpoint infix, such as .col-md-6 | Breakpoint prefix (a breaking change) |
| Customization | Sass variables with @import | @use/@forward; visual changes via CSS variables in token maps |
Next on your front-end path
- HTML practice tests: Bootstrap sits on top of HTML, so solid semantic markup and accessible forms make every component easier.
- CSS3 practice tests: the grid is built with flexbox, so knowing the cascade, flexbox and grid helps you customise Bootstrap with confidence.
- JavaScript interview questions practice tests: the plugin API, events and DOM questions in Bootstrap interviews are JavaScript questions at heart.
For background reading, our CSS3 guide to layout, flexbox and grid covers the CSS under Bootstrap’s grid. Our JavaScript interview questions guide on closures, async code and the DOM covers the language behind the plugins. For a formal credential in that language, see the JSE-40-01 JavaScript certification guide.
How to prepare with a Bootstrap 5 practice test in 2–3 weeks
If you already know HTML and CSS, two to three weeks is a realistic plan for Bootstrap 5. Each week, read one area of the official docs, build a small page with it, then answer practice questions on that area.
- Week 1: layout and utilities Read the grid, breakpoints, containers and spacing pages. Build one page that changes from one column on phones to three on large screens, using only Bootstrap classes.
- Week 2: forms and components Build a sign-up form with floating labels and Bootstrap validation, then add a navbar, a modal, an offcanvas menu and a tooltip.
- Week 3: JavaScript API, Sass and color modes Control a modal from JavaScript with
getOrCreateInstance()and listen to its events. Compile Bootstrap from Sass with your own$primarycolor, then add a dark mode withdata-bs-theme. Finish with the Bootstrap 5 practice tests in timed Exam Mode and revise the topic areas where you lost marks.
Tip
Check that every docs page you read has /docs/5.3/ in its address. getbootstrap.com now shows Bootstrap 6 alpha pages too, and the v4 docs are still online.
Planning more than one exam?
Practising HTML, CSS or JavaScript as well, or a framework such as React or Vue? The All-Access Pass covers every practice test on Exametics, including new exams as they are added, with lifetime access. It costs less than buying about six single practice tests.
Free Bootstrap 5 practice questions (10 with answers)
Try these 10 free practice questions on Bootstrap 5 before you start a full practice test. They are original sample questions written against the Bootstrap 5.3 docs, and the Exametics Bootstrap 5 practice tests have 162 more like them, each with an explanation and a hint.
Practice question 1 · Grid and breakpoints
A column inside a .row has the classes col-12 col-md-6. How wide is it on different screens?
- A. Full width below 992px and half width from 992px
- B. Full width below 768px and half width from 768px upwards
- C. Half width only between 768px and 991px, then full width again
- D. Full width on every screen, because
col-12overridescol-md-6
Show answer
Answer: B. Bootstrap’s grid is mobile-first. col-12 applies from 0px, and col-md-6 applies at the md breakpoint (768px) and every larger breakpoint, so the column is half width from 768px upwards. A uses the lg breakpoint (992px), not md. C is wrong because a breakpoint class keeps applying at all larger sizes; it does not stop at the next tier. D is wrong because the larger breakpoint class wins once its media query matches.
Practice question 2 · Spacing utilities
With Bootstrap’s default Sass settings, what does the class .ms-3 do on a left-to-right page?
- A. Sets
margin-topto 1rem - B. Sets
margin-leftto 3rem - C. Adds a margin only on small (sm) screens
- D. Sets
margin-leftto 1rem (it would bemargin-righton a right-to-left page)
Show answer
Answer: D. In ms-3, m means margin, s means start, and size 3 equals $spacer, which is 1rem by default. Start is the left side in a left-to-right layout and the right side in a right-to-left one. A is wrong because top is t. B is wrong because size 3 is 1rem, not 3rem; size 5 is $spacer * 3. C confuses the side letter s with the sm breakpoint, which would be written ms-sm-3.
Practice question 3 · Forms
This floating label never moves up when the user types. What is the problem?<div class="form-floating"><label for="email">Email address</label><input type="email" class="form-control" id="email" placeholder="[email protected]"></div>
- A. The
<input>must come before the<label>inside.form-floating - B. The input needs an empty
placeholderattribute - C. The label needs the class
.form-label - D. Floating labels only work on
<textarea>elements
Show answer
Answer: A. Bootstrap’s floating labels are CSS-only and use a sibling selector, so the input has to come first and the label after it. B is the opposite of the rule: the docs require a non-empty placeholder, which is already present here. C is wrong because .form-label is for standard labels and does not affect floating. D is wrong because floating labels work with .form-control inputs, textareas and .form-select.
Practice question 4 · Forms
You want Bootstrap’s own validation styles instead of the browser’s pop-up messages, and you want them to appear only after the user tries to submit the form. What should you do?
- A. Add
.is-invalidto every required field when the page loads - B. Keep the
requiredattributes and rely on the browser’s default behaviour - C. Add
novalidateto the<form>, then add.was-validatedto the form when the user tries to submit - D. Remove the
requiredattributes and add.needs-validationto each input
Show answer
Answer: C. novalidate switches off the browser’s feedback tooltips but keeps the validation API, and Bootstrap only shows its :invalid and :valid styles inside a parent with .was-validated. Adding that class on submit gives you the timing you want. A marks every field as invalid before the user has typed anything. B shows the browser’s messages, not Bootstrap’s. D removes the constraints that make a field invalid, and .needs-validation is only the class the docs’ example script uses to find forms.
Practice question 5 · Components
You have <div class="offcanvas" id="menu" tabindex="-1"> and a button with data-bs-toggle="offcanvas" data-bs-target="#menu". Which class should you add to the offcanvas so it slides in from the right edge of the viewport?
- A.
.offcanvas-right - B.
.offcanvas-end - C.
.offcanvas-start - D.
.float-end
Show answer
Answer: B. Offcanvas has no default placement, so you add a modifier class, and .offcanvas-end places it on the right of the viewport. A is wrong because Bootstrap 5 uses logical names (start and end), not left and right. C places the panel on the left. D is a float utility for normal content and does not position an offcanvas.
Practice question 6 · Migrating from Bootstrap 4
A Bootstrap 4 page uses <button class="btn btn-primary btn-block"> for full-width stacked buttons. What is the Bootstrap 5.3 way to get the same result?
- A. Keep
.btn-block; it is deprecated but still works - B. Remove
.btn-blockand wrap the buttons in<div class="d-grid gap-2"> - C. Wrap the buttons in a
.form-group - D. Replace
.btn-blockwith.btn-lg
Show answer
Answer: B. Bootstrap 5 dropped .btn-block. The docs now build block buttons from utilities: a .d-grid wrapper stretches the buttons to full width and a .gap-* class spaces them. A is wrong because the class was removed, not just deprecated, so it has no effect. C is wrong because .form-group was also dropped in Bootstrap 5 and never controlled button width. D only changes the button size, not its width.
Practice question 7 · JavaScript plugins
A modal must not open if the user has unsaved changes elsewhere on the page. Which code stops it from opening?
- A. Listen for
show.bs.modaland callevent.preventDefault()when there are unsaved changes - B. Listen for
shown.bs.modaland callevent.preventDefault() - C. Listen for
hide.bs.modaland callevent.preventDefault() - D. Add
data-bs-backdrop="static"to the modal
Show answer
Answer: A. Bootstrap fires the infinitive event (show) at the start of an action, and all infinitive events support preventDefault(), which stops the action before it happens. B is too late: shown fires after the modal is already visible. C cancels closing, not opening. D only stops the modal closing when the user clicks outside it; it does not stop it opening.
Practice question 8 · JavaScript plugins
A page loads bootstrap.bundle.min.js and has <button class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-title="Save">. No tooltip appears on hover. Why?
- A. Bootstrap 5 tooltips need jQuery
- B. The bundle does not include Popper, so tooltips cannot be positioned
- C. Tooltips are opt-in, so you must initialise them, for example with
new bootstrap.Tooltip(element) - D.
data-bs-titleis not supported; the button must usetitle
Show answer
Answer: C. The Bootstrap docs say tooltips are opt-in for performance reasons, so you must initialise them yourself. A is wrong because Bootstrap 5 dropped its jQuery dependency. B is wrong because bootstrap.bundle.min.js includes Popper; it is the non-bundle file that leaves it out. D is wrong because the docs accept either title or data-bs-title.
Practice question 9 · Color modes
Your page uses the default light color mode. Using the approach the Bootstrap 5.3 docs recommend (no deprecated classes), how do you show one dropdown in dark mode?
- A. Add
data-bs-theme="dark"to the<html>element - B. Wrap the dropdown in a
@media (prefers-color-scheme: dark)block in your HTML - C. Add
.dropdown-menu-darkto the menu - D. Add
data-bs-theme="dark"to that dropdown’s parent.dropdown
Show answer
Answer: D. Since v5.3.0, color modes can be set globally or on a single component, so data-bs-theme="dark" on the parent .dropdown makes just that dropdown dark. A switches the whole page to dark mode. B is wrong because media queries belong in CSS, not HTML, and follow the system setting rather than one component. C is the older approach, which the migration guide lists as deprecated in favour of data-bs-theme.
Practice question 10 · Sass customization
You import Bootstrap’s Sass in parts (functions, variables, maps, mixins and so on) and want to set $primary: shade-color(#0d6efd, 20%); using Bootstrap’s own shade-color() function. Where should this line go?
- A. At the very end of the file, after every Bootstrap import
- B. At the very top of the file, before any Bootstrap import
- C. After importing Bootstrap’s functions and before importing its variables
- D. Inside
node_modules/bootstrap/scss/_variables.scss
Show answer
Answer: C. The Sass docs say variable overrides must come after Bootstrap’s functions are imported but before the rest of the imports. Your value then wins, because Bootstrap’s own variables use !default and do not replace a value that is already set. A is too late, because Bootstrap has already used the default $primary to build its maps and CSS. B puts the line before shade-color() exists. D edits Bootstrap’s source, which a package update would overwrite.
How did you score?
8–10 correct: you know Bootstrap 5.3 well, so try a full timed test in Exam Mode. Under 8: go back to the topic area you missed most, for example forms or the JavaScript API, then practise with 162 more Bootstrap 5 questions like these.
Common mistakes in Bootstrap 5 practice tests
Many wrong answers in a Bootstrap 5 practice test come from Bootstrap 4 habits, not hard concepts.
- Using Bootstrap 4 classes.
.ml-3,.sr-only,.form-group,.btn-blockand.no-guttersdo nothing in Bootstrap 5. - Reading breakpoints as ranges. A class such as
.col-lg-4applies from the lg breakpoint upwards, not only on large screens. - Expecting every plugin to start on its own. Modals and dropdowns work through data attributes, but tooltips and popovers must be initialised in JavaScript.
- Mixing up
showandshownevents. Only the first one supportspreventDefault(); the second fires after the action is complete. - Thinking dark mode is automatic. Bootstrap 5.3 controls color modes with
data-bs-theme, not the user’s system setting, unless you add a toggler script or set$color-mode-type: media-queryin Sass.
Bootstrap 5 practice test and quiz FAQs
How many questions are in the Exametics Bootstrap 5 practice tests?
The Exametics Bootstrap 5 Practice Tests have 3 practice tests with 54 questions each, 162 questions in total, including a timed Exam Mode test. They are knowledge and interview-preparation tests, not an official certification exam.
Are there free Bootstrap 5 practice questions?
Yes. This post has 10 free Bootstrap 5 practice questions with answers, covering the grid, spacing utilities, forms, offcanvas, the JavaScript plugin API, color modes and Sass. The full Exametics Bootstrap 5 practice tests have 162 more questions like these, each with an explanation and a hint.
Is there an official Bootstrap certification?
No. Bootstrap is an open-source toolkit released under the MIT licence, and the official Bootstrap website lists no certification or exam. A Bootstrap 5 practice test is a practical way to check your skills before an interview or a job skills test.
Should I learn Bootstrap 5 or Bootstrap 6 in 2026?
Learn Bootstrap 5.3 first. The official Bootstrap versions page lists v5.3.8 as the latest Bootstrap 5 release, while Bootstrap 6 is only in its first alpha, released on 8 October 2026, and the Bootstrap team says Bootstrap 5 remains supported.
Is Bootstrap 5 hard, and how long does it take to prepare?
Bootstrap 5 is not hard if you already know HTML and CSS, but the details of the grid, forms, the JavaScript API and Bootstrap 4 changes catch many people out. Two to three weeks of reading the official Bootstrap 5.3 docs, building small pages and answering practice questions is a realistic plan.
Do Bootstrap 4 classes work in Bootstrap 5?
Many do not. The official Bootstrap 5.3 migration guide says .ml-* and .mr-* were renamed .ms-* and .me-*, .no-gutters was renamed .g-0, and .form-group and .btn-block were dropped. A Bootstrap 5 practice test checks that you use the new names.
Official documentation: Bootstrap 5.3: Get started. Checked on 9 November 2026.
Test your Bootstrap 5 skills with 162 practice questions
Three practice tests cover Bootstrap 5.3 from the grid and utilities to forms, components, the JavaScript plugin API, Sass and color modes. Every answer is explained, with a hint, so you learn from each mistake.
✓ Every answer explained · ✓ Timed exam mode · ✓ 30-day refund