0
0
Bootsrapmarkup~5 mins

Button styles and variants in Bootsrap - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the basic class used to create a button in Bootstrap?
The basic class is <code>btn</code>. It styles an element as a button with Bootstrap's default look.
Click to reveal answer
beginner
Name three Bootstrap button variant classes and their typical colors.
  • btn-primary: Blue, used for main actions.
  • btn-secondary: Gray, used for less important actions.
  • btn-success: Green, used for positive actions like 'Save'.
Click to reveal answer
intermediate
How do you make a Bootstrap button appear larger or smaller?
Add btn-lg for a large button or btn-sm for a small button alongside btn and the variant class.
Click to reveal answer
beginner
What class would you add to a Bootstrap button to make it look like a link?
Use the class btn-link. It styles the button to look like a simple text link but keeps button behavior.
Click to reveal answer
beginner
How can you disable a Bootstrap button so it cannot be clicked?
Add the disabled attribute to the button element or add the class disabled for links styled as buttons.
Click to reveal answer
Which class combination creates a large, green Bootstrap button?
Abtn btn-success btn-lg
Bbtn btn-primary btn-sm
Cbtn btn-secondary btn-lg
Dbtn btn-link btn-lg
What does the btn-outline-primary class do?
ACreates a button with a blue background
BCreates a button that looks like a link
CCreates a disabled button
DCreates a button with a blue border and transparent background
How do you make a Bootstrap button fill the full width of its container?
AAdd class <code>btn-wide</code>
BAdd class <code>btn-full</code>
CAdd class <code>btn-block</code>
DAdd class <code>btn-fluid</code>
Which attribute or class disables a Bootstrap button?
Aclass <code>btn-disabled</code>
Bdisabled attribute or class <code>disabled</code>
Creadonly attribute
Dclass <code>btn-off</code>
What is the purpose of the btn-link class?
ATo create a button that looks like a hyperlink
BTo create a button with a link icon
CTo create a button that opens a new tab
DTo create a disabled button
Explain how to create different button styles in Bootstrap and when you might use each variant.
Think about how colors help users understand button importance.
You got /4 concepts.
    Describe how to adjust the size and disabled state of Bootstrap buttons.
    Consider how size changes the button's look and how disabling prevents clicks.
    You got /3 concepts.