BS4 Badges - W3points | w3schools | TutorialPoint | | w3school

Bootstrap badges are generally used to indicate some of the most valuable information on the webpages. This information includes, warning messages, heading and notification counter. The way in which the badges are used for different for different users. It is different for the screen readers and assertive technologies.
The styling of badges provides a visual cue and are presented to the users along with the content of the badge. Depending on the situation, the badges are seen like the additional words and as the numbers at the end of a sentence, button or link. If the context is clear you can include additional context as well for a visually hidden piece of additional text.
Showing counter with badges
You can use the badges as part of the buttons or links for providing a counter. Counter in bootstrapping means the number of received or unreceived messages and number of notifications. The counters are mostly found in e-mail clients, application dashboard and social networking websites. Through the syntax of badges, you can create various shapes. If you want. badge class, then you can go for the. badge-secondary.
Badges are scaled to match the size of the parent element and are therefore made according to the proper measurements.
Pill Badges
You can use the. badge pill modifier class for making the badges in a more rounded form that have a larger border radius and horizontal padding. When you are using the pill badges, make sure you use the actionable badges, while having a hover and focus states.
Contextual Badges
The contextual classes or badges are generally used for changing the color of the badges. Sometimes you need different colors to represent different information. Badges sometimes becomes confusing for the users due to its variety. However, when you use the different variety of color variations, name each variation, this will prevent any confusion regarding the badges.