https://www.w3schools.com/css/css_icons.asp

Icons can easily be added to your HTML page, by using an icon library.

css22 CSS Icons_ico

 


 


How To Add Icons

The simplest way to add an icon to your HTML page, is with an icon library, such as Font Awesome.

Add the name of the specified icon class to any inline HTML element (like <i> or <span>).

All the icons in the icon libraries below, are scalable vectors that can be customized with CSS (size, color, shadow, etc.)


Font Awesome Icons

To use the Font Awesome icons, go to fontawesome.com, sign in, and get a code to add in the <head> section of your HTML page:

<script src="https://kit.fontawesome.com/yourcode.js" crossorigin="anonymous"></script>

Read more about how to get started with Font Awesome in our Font Awesome 5 tutorial.

Note: No downloading or installation is required!

Example

<!DOCTYPE>
<html>
<head>
<script="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script>
</head>
<body>

<i="fas fa-cloud"></i>
<i="fas fa-heart"></i>
<i="fas fa-car"></i>
<i="fas fa-file"></i>
<i="fas fa-bars"></i>

</body>
</html>

Result:

css22 CSS Icons_ico_02

 

For a complete reference of all Font Awesome icons, visit our Icon Reference.



 


Bootstrap Icons

To use the Bootstrap glyphicons, add the following line inside the <head> section of your HTML page:

invalid <link rel="stylesheet" href="https:///bootstrap/3.3.7/css/bootstrap.min.css">

Note: No downloading or installation is required!

Example

<!DOCTYPE>
<html>
<head>
<link="stylesheet" href="https:///bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body>

<i="glyphicon glyphicon-cloud"></i>
<i="glyphicon  glyphicon-remove"></i>
<i="glyphicon glyphicon-user"></i>
<i="glyphicon glyphicon-envelope"></i>
<i="glyphicon glyphicon-thumbs-up"></i>

</body>
</html>

Result:

 


Google Icons

To use the Google icons, add the following line inside the <head> section of your HTML page:

<link rel="stylesheet" href="https:///icon?family=Material+Icons">

Note: No downloading or installation is required!

Example

<!DOCTYPE>
<html>
<head>
<link="stylesheet" href="https:///icon?family=Material+Icons">
</head>
<body>

<i="material-icons">cloud</i>
<i="material-icons">favorite</i>
<i="material-icons">attachment</i>
<i="material-icons">computer</i>
<i="material-icons">traffic</i>

</body>
</html>

Result:

css22 CSS Icons_html_03

 

For a complete list of all icons, visit our Icon Tutorial.