Icon
Using the icon element, you can display any webfont you want. We recommend using materialdesignicons.comopen in new window, since they have a large collection of icons.
In this example, we'll be using Material Design Icons.
Installation
If you haven't added it yet, here's the code for the CDN.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@6.4.95/css/materialdesignicons.min.css">
1
After that, just specify the class of the icon with the name
attribute. Here's a simple example
Size
You can also specify the size of the icon using the size
attribute. It can be any font-size value.
Other Webfonts
As said before, you can use any other webfont you prefer, here's an example with Font Awesomeopen in new window
SVGs
You can use SVG's too, just remember that the size
attribute won't work with SVGs.