Bootstrap Badges and Labels

Bootstrap Badges are numerical indicators used to show that how many items are associated with the specific link. Badges are used to highlight new or unread items.

The numbers (5, 10, and 2) are the badges.

Use the .badge class within <span> elements to create badges:

Example -

Bootstrap Labels

Bootstrap labels are used to specify the additional information about something like offering counts, tips, or other makeup for pages.

Use the .label class,  followed by one of the six contextual classes .label-default, .label-primary, .label-success, .label-info, .label-warning or .label-danger, within a <span> element to create a label:

Example -

Bootstrap Label Example 2: changing colors

We can change the label colors by using contextual label classes.

Example -

Contextual Badges

You can use the contextual classes to change the color of a badge.

Example -

Bootstrap 4 Pill Badges

Pill badges are used to make the badges more round. Use the class .badge-pill class to add pill badges.

Example -