Are you learning Bootstrap 5 and want to see how much you’ve mastered? Quizzes are a great way to test your understanding and identify areas for improvement.
This Bootstrap 5 Quiz is designed for learners of all levels—from beginners to advanced developers. It covers core topics like the grid system, components, utilities, and responsive design principles. At the end of the quiz, you’ll find answers and explanations to help you learn from your mistakes.
Explore more coding resources and quizzes at The Coding College.
Quiz Instructions
- Each question has four options.
- Choose the best answer for each question.
- Check your answers at the end of the quiz.
Bootstrap 5 Quiz Questions
Question 1: What is Bootstrap 5 primarily used for?
- Back-end Development
- Creating responsive front-end designs
- Writing server-side logic
- Managing databases
Question 2: What is the default breakpoint for col-sm-*
in Bootstrap 5?
- 576px
- 768px
- 992px
- 1200px
Question 3: Which utility class is used to make text bold in Bootstrap 5?
text-italic
font-weight-bold
text-bold
fw-bold
Question 4: How do you include Bootstrap 5 in your project?
- Download and manually link files
- Use a CDN link
- Install via npm
- All of the above
Question 5: What does the class d-flex
do in Bootstrap 5?
- Centers the content horizontally
- Applies a flexbox layout to an element
- Hides the element
- Adds padding to the element
Question 6: Which component is used to create a sliding image gallery in Bootstrap 5?
- Modal
- Alert
- Carousel
- Jumbotron
Question 7: What does the bg-primary
class do?
- Sets the text color to primary
- Adds a primary background color to the element
- Adds a gradient background
- Adds a border
Question 8: Which class is used to make a button look like a link?
btn-link
btn-outline-link
link-btn
text-link
Question 9: What does the row
class in Bootstrap 5 do?
- Adds horizontal padding to columns
- Creates a flexbox container for columns
- Aligns text to the left
- Hides an element
Question 10: How do you create a responsive grid in Bootstrap 5?
- Use
col-
classes only - Use
container
androw
classes withcol-*
classes - Use
grid-system
class - Use
container-fluid
only
Question 11: Which utility class hides an element on extra-small screens in Bootstrap 5?
d-none
d-xs-none
d-sm-none
d-md-none
Question 12: How can you add a tooltip to an element in Bootstrap 5?
- Use the
data-tooltip
attribute - Add
data-bs-toggle="tooltip"
andtitle
attributes - Include
tooltip
in theclass
attribute - Use
data-toggle-tooltip
attribute
Question 13: What is the difference between container
and container-fluid
?
container
is fixed-width,container-fluid
is full-widthcontainer
adds padding,container-fluid
removes paddingcontainer
is for small devices,container-fluid
is for large devices- Both are identical
Question 14: Which of the following is a valid color utility in Bootstrap 5?
text-color-red
text-warning
bg-dark-red
bg-grey
Question 15: How do you enable a dropdown in Bootstrap 5?
- Use
data-bs-dropdown
- Add
data-bs-toggle="dropdown"
- Use the
dropdown-enable
class - Dropdowns are enabled by default
Answers and Explanations
- Answer: 2
Bootstrap 5 is primarily used for creating responsive front-end designs. - Answer: 1
Thecol-sm-*
breakpoint applies to devices with a width of 576px or more. - Answer: 4
The classfw-bold
is used to make text bold in Bootstrap 5. - Answer: 4
Bootstrap 5 can be included via manual download, CDN, or npm. - Answer: 2
Thed-flex
class applies a flexbox layout to an element. - Answer: 3
Bootstrap’s Carousel component is used to create sliding image galleries. - Answer: 2
Thebg-primary
class applies the primary background color to an element. - Answer: 1
Thebtn-link
class makes a button look like a link. - Answer: 2
Therow
class creates a flexbox container for columns. - Answer: 2
Usecontainer
,row
, andcol-*
classes to create a responsive grid. - Answer: 1
Thed-none
class hides an element on all screen sizes. - Answer: 2
Tooltips are added withdata-bs-toggle="tooltip"
andtitle
attributes. - Answer: 1
Thecontainer
class provides a fixed-width layout, whilecontainer-fluid
is full-width. - Answer: 2
Thetext-warning
class is a valid text color utility in Bootstrap 5. - Answer: 2
Usedata-bs-toggle="dropdown"
to enable a dropdown in Bootstrap 5.
Conclusion
Taking this quiz helps you evaluate your knowledge of Bootstrap 5 and spot areas where you can improve. Quizzes like these are an excellent supplement to tutorials and exercises, making your learning more engaging and effective.