ShapeYourPath
(current)
Run Code
Live Code Editor-Materialize Badge Custom Captions
Source Code
<!DOCTYPE html> <html lang="en"> <head> <title>Materialize Badge Custom Captions</title> <meta name="viewport" content="width = device-width, initial-scale = 1" /> <meta name="robots" content="noindex,nofollow"> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" /> <!-- Compiled and minified CSS --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css" /> <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script> <!-- Compiled and minified JavaScript --> <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script> <style type="text/css"> p { font-size: 18px; } h2 { font-size: 28px; } </style> </head> <body> <div class="container"> <h1 class="center-align">Materialize Badge Caption Customization</h1> <p class="center-align">You can change badge caption easily through the data-badge-caption data attribute. Lets us understand it with the help of an example.</p> <div class="row"> <div class="col s12"> <div class="collection"> <a href="#!" class="collection-item"> Email <span class="new badge green" data-badge-caption=" Messages">105</span> </a> <a href="#!" class="collection-item"> Alerts <span class="new badge red" data-badge-caption=" Warnings">10</span> </a> </div> </div> </div> <!--/row--> </div> <!--/column--> </body> </html>
Output :
Running
MATERIALIZE-TUTORIAL
MATERIALIZE-BADGES OTHER EXAMPLES
Materialize Badge Inside Collection Example
Materialize Badge Background Color Example
Materialize Badges in Dropdown Example
Materialize Badges in Collapsibles Example
Materialize Badge Custom Captions Example