Bootstrap 4 Tutorial
BS4 Introduction BS4 Getting Started BS4 Containers BS4 Typography BS4 Grid Basics BS4 Tables BS4 Images BS4 Jumbotron BS4 Buttons BS4 Button Groups BS4 Spinners BS4 Alerts BS4 Dropdowns BS4 Collapse BS4 Navs BS4 Navbars BS4 Pagination BS4 Breadcrumbs BS4 Badges BS4 Progress Bars BS4 List Groups BS4 Cards BS4 Forms BS4 Inputs BS4 Input Groups BS4 Custom Forms BS4 Carousel BS4 Modal BS4 Tooltips BS4 Popovers BS4 Toast BS4 Scrollspy BS4 Media Objects BS4 Filters BS4 Utilities Bootstrap 3 vs. Bootstrap 4
Bootstrap 4 Grid
BS4 Grid System BS4 Grid XSmall BS4 Grid Small BS4 Grid Medium BS4 Grid Large BS4 Grid XLarge
Bootstrap 4 Reference
JS Alert JS Carousel JS Collapse JS Dropdown JS Modal JS Popover JS Tab JS Toasts JS Tooltip

Bootstrap 4 Badges

Example heading New

Example heading New

Example heading New

Example heading New

Example heading New

Example heading New

Badges are used to add additional information to any content.

Use the .badge class together with a contextual class within <span> elements to create rectangular badges.

Run code

Note: Badges scale to match the size of the immediate parent element by using relative font sizing and em units.


Contextual Badges

Primary Secondary Success Danger Warning Info Light Dark

Add any of the below mentioned contextual classes (.badge-*) to change the color of a badge.

Run code

Badge inside a Button

Badges can be used as part of buttons to provide a counter.

Run code

Pill Badges

Primary Secondary Success Danger Warning Info Light Dark

Use the .badge-pill class to make badges more rounded.

Run code

Badges as Links

Badges can be used as part of links to provide a counter.

Run code