Google News
logo
Bootstrap-4 - Interview Questions
Explain Bootstrap 4 Badges.
To create a bootstrap 4 badge, apply the .badge class, as well as one of the .badge-primary, .badge-secondary, etc,..

Button Badges : Badges can be used as part of links or buttons to provide a counter.
<button type="button" class="btn btn-primary"> Tutorials <span class="badge badge-light">14</span> </button>

Contextual Badges : The contextual classes (.badge-*) to change the color of a badge.
<span class="badge badge-default">Default</span>
<span class="badge badge-primary">Primary</span> etc,..

Pill Badges : Use the bootstrap 4 pill badges are add .badge-pill class to make the badges more round.
<span class="badge badge-pill badge-default">Default</span>
<span class="badge badge-pill badge-primary">Primary</span> etc,..
Advertisement