0
0
Bootsrapmarkup~5 mins

Alert variants and colors in Bootsrap - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a Bootstrap alert variant?
A Bootstrap alert variant is a style option that changes the color and appearance of an alert box to indicate different meanings like success, warning, danger, or info.
Click to reveal answer
beginner
Name three common Bootstrap alert variants and their typical meanings.
Success: Green color, means a positive action or success.<br>Warning: Yellow/orange color, means caution or something to watch.<br>Danger: Red color, means an error or serious problem.
Click to reveal answer
beginner
How do you add a success alert in Bootstrap using HTML?
Use a <div> with classes alert and alert-success. Example:<br>
<div class="alert alert-success" role="alert">Success message here.</div>
Click to reveal answer
intermediate
What role attribute should you add to Bootstrap alerts for accessibility?
Add role="alert" to the alert container. This helps screen readers announce the alert message immediately.
Click to reveal answer
intermediate
Can Bootstrap alert variants be customized with your own colors?
Yes, you can customize alert colors by overriding Bootstrap CSS variables or adding your own CSS styles to change the background and text colors.
Click to reveal answer
Which Bootstrap class creates a red alert box?
Aalert-info
Balert-warning
Calert-success
Dalert-danger
What is the purpose of the role="alert" attribute in Bootstrap alerts?
ATo style the alert with colors
BTo help screen readers announce the alert immediately
CTo add animation effects
DTo make the alert dismissible
Which alert variant is typically yellow or orange in Bootstrap?
Aalert-warning
Balert-primary
Calert-success
Dalert-secondary
How do you make a Bootstrap alert dismissible (able to close)?
AAdd class <code>alert-dismissible</code> and include a close button
BAdd class <code>alert-close</code>
CAdd class <code>alert-hide</code>
DAdd class <code>alert-remove</code>
Which Bootstrap alert variant is used for informational messages?
Aalert-success
Balert-danger
Calert-info
Dalert-warning
Explain how Bootstrap alert variants help users understand different types of messages on a website.
Think about how colors like green or red make you feel about the message.
You got /4 concepts.
    Describe how to create an accessible alert in Bootstrap that can be read by screen readers.
    Accessibility means everyone can understand the message, including people using special tools.
    You got /4 concepts.