Complete the code to create a basic Bootstrap alert with a primary color.
<div class="alert alert-[1]" role="alert"> This is a primary alert—check it out! </div>
alert- prefixThe class alert-primary gives the alert a blue primary color in Bootstrap.
Complete the code to create a Bootstrap alert with a danger variant.
<div class="alert alert-[1]" role="alert"> This is a danger alert—be careful! </div>
alert-warning instead of alert-dangerThe alert-danger class creates a red alert to indicate danger or errors.
Fix the error in the alert class to show a success alert with green color.
<div class="alert [1]" role="alert"> Operation completed successfully! </div>
The correct Bootstrap class for a green success alert is alert-success. It must be one word with a dash.
Fill both blanks to create a Bootstrap alert with a warning variant and add the role attribute.
<div class="alert alert-[1]" role="[2]"> Warning! Check your input. </div>
button as the role instead of alertThe class alert-warning creates a yellow warning alert. The role attribute should be alert for accessibility.
Fill all three blanks to create a dismissible Bootstrap alert with a success variant and the correct button attributes.
<div class="alert alert-[1] alert-dismissible fade show" role="alert"> Success! Your action was completed. <button type="button" class="btn-close" data-bs-dismiss="[2]" aria-label="[3]"></button> </div>
danger instead of successdata-bs-dismiss valueThe alert variant is alert-success for green color. The button dismisses the alert and the aria-label should be Close for screen readers.