Easy learning with example program codes

Bootstrap Contextual Badges Tutorial

We can use the contextual classes (.badge-*) to change the color of a badge.

Bootstrap Contextual Badges Example:

<!DOCTYPE html>
<html lang="en">
  <title>Bootstrap Contextual Badges Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="">
  <script src=""></script>
  <script src=""></script>
  <script src=""></script>
<div class="container">
  <h2>Bootstrap Contextual Badges Example</h2>
  <span class="badge badge-primary">Primary</span>
  <span class="badge badge-secondary">Secondary</span>
  <span class="badge badge-success">Success</span>
  <span class="badge badge-danger">Danger</span>
  <span class="badge badge-warning">Warning</span>
  <span class="badge badge-info">Info</span>
  <span class="badge badge-light">Light</span>
  <span class="badge badge-dark">Dark</span>

Try it:

Bootstrap Contextual Badges Example on

Please follow and like us:

Bootstrap 3 Tutorial

Copyright © 2020 CodesJava Protection Status