0
0
Bootsrapmarkup~10 mins

Button styles and variants in Bootsrap - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a primary Bootstrap button.

Bootsrap
<button type="button" class="btn btn-[1]">Primary</button>
Drag options to blanks, or click blank then click option'
Aprimary
Bsecondary
Cdanger
Dsuccess
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'btn-primary' directly in the blank instead of just 'primary'.
Choosing a color variant that doesn't match the button label.
2fill in blank
medium

Complete the code to create a Bootstrap button with a danger style.

Bootsrap
<button type="button" class="btn btn-[1]">Delete</button>
Drag options to blanks, or click blank then click option'
Asuccess
Bwarning
Cinfo
Ddanger
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'btn-danger' in the blank instead of just 'danger'.
Choosing a color that does not convey danger.
3fill in blank
hard

Fix the error in the button class to make it a Bootstrap success button.

Bootsrap
<button type="button" class="btn btn-[1]">Save</button>
Drag options to blanks, or click blank then click option'
Asuccess
Bsecondary
Cprimary
Ddanger
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'danger' or 'primary' instead of 'success'.
Including 'btn-' prefix inside the blank.
4fill in blank
hard

Fill both blanks to create a large, outline primary Bootstrap button.

Bootsrap
<button type="button" class="btn btn-[1] btn-[2]">Click Me</button>
Drag options to blanks, or click blank then click option'
Aoutline-primary
Blg
Csm
Dprimary
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing size and style classes incorrectly.
Using 'primary' instead of 'outline-primary' for outline style.
5fill in blank
hard

Fill all three blanks to create a small, disabled, secondary Bootstrap button.

Bootsrap
<button type="button" class="btn btn-[1] btn-[2]" disabled>[3]</button>
Drag options to blanks, or click blank then click option'
Asecondary
Bsm
CDisabled
Dprimary
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'primary' instead of 'secondary' for color.
Forgetting to add the 'disabled' attribute (though not part of blanks).
Using wrong text inside the button.