0
0
Bootsrapmarkup~20 mins

Button sizes in Bootsrap - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Bootstrap Button Size Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
rendering
intermediate
2:00remaining
What size will this Bootstrap button render?
Given the following button code, what size will the button appear in the browser?
Bootsrap
<button type="button" class="btn btn-primary btn-lg">Click me</button>
AA medium (default) sized button
BA very small button
CA large button
DA button with extra padding but default font size
Attempts:
2 left
💡 Hint
Look at the class that controls size: btn-lg means large.
🧠 Conceptual
intermediate
1:30remaining
Which class sets a small Bootstrap button?
Which Bootstrap class should you add to a button to make it smaller than the default size?
Abtn-sm
Bbtn-xs
Cbtn-small
Dbtn-mini
Attempts:
2 left
💡 Hint
Bootstrap uses btn-sm for small buttons, not btn-xs or others.
📝 Syntax
advanced
2:00remaining
What error occurs with this button size class?
What happens if you use this button code in Bootstrap 5?
<button class="btn btn-primary btn-xs">Click</button>
Bootsrap
<button class="btn btn-primary btn-xs">Click</button>
AButton is hidden
BThe button renders with default size because btn-xs is not recognized
CButton renders extra large
DSyntax error in HTML
Attempts:
2 left
💡 Hint
Bootstrap 5 does not have btn-xs class.
selector
advanced
1:30remaining
Which CSS selector targets all large Bootstrap buttons?
Which CSS selector will select all buttons with the large size class in Bootstrap?
A.btn .btn-lg
B.btn-lg button
Cbutton .btn-lg
Dbutton.btn-lg
Attempts:
2 left
💡 Hint
Look for buttons that have both btn and btn-lg classes.
accessibility
expert
2:30remaining
How to make a large Bootstrap button accessible?
You have a large button with class btn-lg. What should you add to improve accessibility for screen readers?
Bootsrap
<button class="btn btn-primary btn-lg">Submit</button>
AAdd aria-label="Submit form" to describe the button action
BAdd tabindex="-1" to prevent keyboard focus
CAdd role="presentation" to hide it from screen readers
DAdd style="font-size: 2rem;" inline for better visibility
Attempts:
2 left
💡 Hint
Screen readers need clear descriptions of button actions.