Challenge - 5 Problems
Bootstrap Beginner Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ rendering
intermediate2:00remaining
What will this Bootstrap page display?
Look at the HTML code below. What will you see in the browser when this page loads?
Bootsrap
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Bootstrap Test</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"> </head> <body> <div class="container"> <h1 class="text-primary">Welcome to Bootstrap!</h1> <p class="lead">This is your first Bootstrap page.</p> </div> </body> </html>
Attempts:
2 left
💡 Hint
Look at the class names and the Bootstrap CSS link in the head.
✗ Incorrect
The class 'text-primary' makes the heading blue using Bootstrap's primary color. The 'lead' class makes the paragraph text larger and lighter. The Bootstrap CSS is loaded from the CDN, so styles apply correctly.
❓ selector
intermediate1:30remaining
Which Bootstrap class adds spacing around an element?
You want to add margin space around a
using Bootstrap. Which class should you use?
Attempts:
2 left
💡 Hint
Bootstrap uses 'm' for margin and 'p' for padding.
✗ Incorrect
The class 'm-3' adds margin (space outside the element) on all sides. 'p-3' adds padding (space inside). 'text-center' centers text, and 'bg-primary' changes background color.
❓ layout
advanced2:00remaining
How does Bootstrap's grid system layout behave on small screens?
Given this Bootstrap grid code, how will the columns appear on a small screen (less than 576px wide)?
Column 1
Column 2
Column 3
Attempts:
2 left
💡 Hint
Bootstrap grid classes with 'sm' apply from small screens and up.
✗ Incorrect
The 'col-sm-4' class applies starting at small screens (≥576px). Below 576px, columns stack vertically and take full width by default.
❓ accessibility
advanced1:30remaining
Which attribute improves accessibility for a Bootstrap modal?
You have a Bootstrap modal dialog. Which attribute should you add to the modal's main
to help screen readers?
Attempts:
2 left
💡 Hint
Screen readers need to know the modal's title for context.
✗ Incorrect
The 'aria-labelledby' attribute points to the element that labels the modal, helping screen readers announce the modal's purpose. 'data-toggle' is for JavaScript behavior, 'role="button"' is for buttons, and 'tabindex="-1"' manages focus but doesn't label.
🧠 Conceptual
expert1:30remaining
What is the main benefit of using Bootstrap's container class?
Why do Bootstrap pages often wrap content inside a
element?
Attempts:
2 left
💡 Hint
Think about how content looks on different screen sizes.
✗ Incorrect
The 'container' class centers content horizontally and adds padding on the sides. It also adjusts width responsively to keep content neat on all devices. It does not add background, disable scrolling, or change text case.