Badge example 4

From Bootstrap for MediaWiki
Component
Name Badge
Description Regular badge with a link to label content
Provider Skin
Note Since the HTML <a> tag is not allowed within wikitext you need to circumvent its usage. The result is not exactly the same but a compromise. Alternatively you can choose to use an extension that allows to use the HTML <a> tag which is however strongly disadvised for wikis without edit restrictions.
Reference getbootstrap.com - badge
Styling For all possible color styles and corresponding examples, see colors.
Updated for Bootstrap 5. Parts of this page's Bootstrap 4 code no longer work with Bootstrap 5. Wikis moving to Bootstrap 5, for example with Chameleon 6, need to update such content too. See the Bootstrap 4 version of this page.

Result

Primary Secondary Success Danger Warning Info Light Dark

Code

<span class="badge text-bg-primary">[[Primary|<span style="color: white">Primary</span>]]</span>
<span class="badge text-bg-secondary">[[Secondary|<span style="color: white">Secondary</span>]]</span>
<span class="badge text-bg-success">[[Success|<span style="color: white">Success</span>]]</span>
<span class="badge text-bg-danger">[[Danger|<span style="color: white">Danger</span>]]</span>
<span class="badge text-bg-warning">[[Warning|<span style="color: black">Warning</span>]]</span>
<span class="badge text-bg-info">[[Info|<span style="color: white">Info</span>]]</span>
<span class="badge text-bg-light">[[Light|<span style="color: black">Light</span>]]</span>
<span class="badge text-bg-dark">[[Dark|<span style="color: white">Dark</span>]]</span>