HTML Icons


Go to main Page

Icons in HTML

To add icons in an HTML document we have to use font awesome link in the head of the document.

After adding font awesome link we use <i> and between this tag we use class and the name of an icon.

Font awesome Cdn link


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

Icons Syntax


        <!DOCTYPE html>
<html lang="en">
<head>
 
    <title>Document</title>
    <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-heart"></i>
    <i class="fa fa-play"></i>
    <i class="fa fa-cloud"></i>
    <i class="fa fa-bars"></i>
    <i class="fa fa-file"></i>

</body>
</html>
    



You can find a lot of icons and set their font size small or large.