Complete the code to create a simple badge with Bootstrap.
<span class="badge bg-[1]">New</span>
The class bg-primary applies the primary color background to the badge.
Complete the code to add a badge inside a button with Bootstrap.
<button type="button" class="btn btn-[1]">Messages <span class="badge bg-[1]">4</span></button>
Using btn-primary and bg-primary gives the button and badge a matching primary color.
Fix the error in the badge code to show a pill-shaped badge.
<span class="badge rounded-[1] bg-success">99+</span>
The class rounded-pill makes the badge pill-shaped with rounded edges.
Fill both blanks to create a badge with a light background and dark text.
<span class="badge bg-[1] text-[2]">Light Badge</span>
text-white on a light background, making text hard to read.bg-primary instead of bg-light for light background.The bg-light class gives a light background, and text-dark ensures the text is visible with dark color.
Fill all three blanks to create a badge inside a button with a pill shape and warning color.
<button type="button" class="btn btn-[1]">Alerts <span class="badge rounded-[2] bg-[3]">5</span></button>
rounded instead of rounded-pill for pill shape.The button uses btn-warning for a warning color, the badge is pill-shaped with rounded-pill, and the badge background matches with bg-warning.