THE WORLD'S LARGEST WEB DEVELOPER SITE

What is CSS Icons?




Icons come in scalable vector libraries that can be customized with CSS

Common libraries are:

  • Font Awesome Icons
  • Bootstrap Icons
  • Google Icons


How To?

To use icons, just add a link to the icon library the <head> section of your HTML page:

No downloads or installations required!

To insert an icon, add the name of the icon class to any inline HTML element like <i> or <span>.

Font Awesome Example

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>

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

</body>
</html>
Try It Yourself »

For a complete list of icons (Font Awesome, Bootstrap and Google), visit W3School's Icon Reference.



Bootstrap Example

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

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

</body>
</html>
Try It Yourself »

Google Example

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

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

</body>
</html>
Try It Yourself »

Full Icons Tutorial

This has been a short description of Icons.

For a full Icons tutorial go to W3Schools Icons Tutorial.

For a full Icons reference go to W3Schools Icons Reference.