0
0
Bootsrapmarkup~5 mins

Button groups in Bootsrap - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a button group in Bootstrap?
A button group in Bootstrap is a way to group multiple buttons together on a single line, making them look connected and organized.
Click to reveal answer
beginner
Which Bootstrap class is used to create a button group container?
The class .btn-group is used to wrap buttons and create a button group.
Click to reveal answer
intermediate
How do you make a vertical button group in Bootstrap?
Add the class .btn-group-vertical to the container instead of .btn-group to stack buttons vertically.
Click to reveal answer
intermediate
What role does the aria-label attribute play in button groups?
It improves accessibility by describing the group of buttons to screen readers, helping users understand the purpose of the group.
Click to reveal answer
intermediate
How can you add spacing between buttons inside a button group?
Button groups remove spacing by default to connect buttons. To add space, you can use margin utilities like me-2 on buttons or avoid grouping them.
Click to reveal answer
Which class creates a horizontal button group in Bootstrap?
A.btn-group
B.btn-group-vertical
C.btn-group-horizontal
D.btn-group-row
What is the purpose of using aria-label on a button group?
ATo add color to buttons
BTo change button size
CTo make buttons clickable
DTo describe the button group for screen readers
How do you create a vertical stack of buttons in Bootstrap?
AUse .btn-group and add flex-column
BUse .btn-group-vertical
CUse .btn-vertical
DUse .btn-stack
If you want buttons in a group to have space between them, what should you do?
AAdd margin classes like me-2 to buttons
BUse .btn-group with no changes
CUse .btn-space class
DAdd padding to the button group container
Which HTML element is recommended to wrap buttons in a Bootstrap button group?
A<nav>
B<section>
C<div>
D<button>
Explain how to create a horizontal and a vertical button group in Bootstrap. Include accessibility considerations.
Think about the container classes and how screen readers understand groups.
You got /4 concepts.
    Describe how you can add spacing between buttons inside a Bootstrap button group and why you might want to do that.
    Consider Bootstrap's default button group behavior and margin utilities.
    You got /4 concepts.