![]() |
VOOZH | about |
Bootstrap 5 Badges Background colors provide different utility classes for backgrounds that help to enhance the appearance of a badge. The default background of any badge is ".bg-light", which can be used with text color utility, like .text-dark class, which helps to enhance its styling.
Badges Background Colors Classes: The Background colors class can be used with the help of the .bg-* class followed by the below classes:
Syntax: The * is replaceable with any one of the above Badges Background Colors Classes.
<span class="badge bg-*"> ... </span>
Example 1: This example describes the basic usage of the Bootstrap 5 Badges Background colors, where we have displayed all the background colors available for badges.
Output:
Example 2: This example describes the use of different background utility classes to change the appearance of the badge.
Output:
Reference: https://getbootstrap.com/docs/5.0/components/badge/#background-colors