Bootstrap 4 badges classes are used to add additional information to the content such as important heading, warning messages, notification counter, etc. To create a badge, add the .badge class within the element.
By using contextual classes, you can change the color of bootstrap 4 badges. When you are using bootstrap’s .bg-light then you also use text color utility like .text-dark for proper styling. This is because background utilities do not set anything except background-color.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok