Materialize provides a special component called Chip, which can be used to represent a small set of information. For example, a contact, tags, etc.
Sr.No. | Class Name & Description |
---|---|
1 | chip Set the div container as a chip. |
The following example demonstrates the use of chip class to showcase creating various types of tags.
<!DOCTYPE html> <html> <head> <title>The Materialize Chips Example</title> <meta name = "viewport" content = "width = device-width, initial-scale = 1"> <link rel = "stylesheet" href = "https://fonts.googleapis.com/icon?family=Material+Icons"> <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css"> <script type = "text/javascript" src = "https://code.jquery.com/jquery-2.1.1.min.js"></script> <script src = "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js"> </script> </head> <body class = "container"> <div class = "chip"> <img alt = "HTML5" src = "/html5/images/html5-mini-logo.jpg">HTML 5 </div> <div class = "chip"> HTML 5<i class = "material-icons">close</i> </div> </body> </html>
Verify the result.