Skip to content
Related Articles

Related Articles

Materialize CSS | Icons
  • Last Updated : 21 Jun, 2020

Materialize CSS provides a rich set of material icons of google which can be downloaded from Material Design specs. Icon libraries that are supported by materialize css are Google Material Icons, Font Awesome Icons and Bootstrap Icons. Different icons can be selected from Material Icons.

Library and Usage: To use these icon, the following line is added in the <head> part of the HTML code.

<link href=”https://fonts.googleapis.com/icon?family=Material+Icons” rel=”stylesheet”>

Then to use the icons, name of the icon is provided in the <i> part of HTML element.

<i class="material-icons">add</i>

Material icon sizes:  Materialize CSS provides icons in four sizes: tiny, small, medium, large. The sizes for tiny, small, medium and large are 1 rem, 2 rem, 4 rem and 6 rem respectively.



<i class = "material-icons tiny">add</i>  
<i class = "material-icons small">add</i>  
<i class = "material-icons">add</i>  
<i class = "material-icons medium">add</i>  
<i class = "material-icons large">add</i>

Example: 

HTML




<!DOCTYPE html>
<html>
  
<head>
    <!--Import Google Icon Font-->
    <link href=
        rel="stylesheet">
  
    <!-- Compiled and minified CSS -->
    <link rel="stylesheet" href=
  
    <script type="text/javascript" src=
    </script>
  
    <!--Let browser know website is 
        optimized for mobile-->
    <meta name="viewport" content=
    "width=device-width, initial-scale=1.0" />
</head>
  
<body>
  
    <div class="card-panel">
        <h3 class="green-text">Icons</h3>
        <div class="container">
            <div class="row">
                <div class="col">
                    <i class="material-icons 
                        tiny">account_circle</i>
                </div>
                <div class="col">
                    <i class="material-icons">
                        account_circle</i>
                </div>
                <div class="col">
                    <i class="material-icons 
                        small">account_circle</i>
                </div>
                <div class="col">
                    <i class="material-icons 
                        medium">account_circle</i>
                </div>
                <div class="col">
                    <i class="material-icons 
                        large">account_circle</i>
                </div>
            </div>
        </div>
    </div>
  
    <!-- Compiled and minified JavaScript -->
    <script src=
    </script>
</body>
  
</html>

Output:

My Personal Notes arrow_drop_up
Recommended Articles
Page :