Bootstrap Badges: Styling and Usage Guide
☰Fullscreen
Table of Content:
badges with Heading
Badges are used to add additional information to any content. Use the .badge class together with a contextual class (like .badge-secondary) within elements to create rectangular badges. Note that badges scale to match the size of the parent element (if any):
Only Important Code
Badges
Example heading information
Example heading information
Example heading information
Example heading information
Example heading information
Example heading information
Full Code For The Above Example
See Live Preview of the above codeBootstrap Example Badges
Example heading infomation
Example heading infomation
Example heading infomation
Example heading infomation
Example heading infomation
Example heading infomation
Contextual Badges
Use any of the contextual classes (.badge-*) to change the color of a badge:
Only Important Code
Contextual Badges
Primary Secondary Success Danger Warning Info Light Dark
Full Code For The Above Example
See Live Preview of the above codeBootstrap Example Contextual Badges
Primary Secondary Success Danger Warning Info Light Dark
Pill Badges
Use the .badge-pill class to make the badges more round:
Only Important Code
Pill Badges
Primary Badges Secondary Badges Success Badges Danger Badges Warning Badges Info Badges Light Badges Dark Badges
Full Code For The Above Example
See Live Preview of the above codeBootstrap Example Pill Badges
Primary Badges Secondary Badges Success Badges Danger Badges Warning Badges Info Badges Light Badges Dark Badges
Badge inside an Element
An example of using a badge inside a button:
Only Important Code
Badge inside a Button
Full Code For The Above Example
See Live Preview of the above codeBootstrap Example Badge inside a Button