how to add icons in css code example

Example 1: how to add icon in css

<!DOCTYPE html>
<html>

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

<body>

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

</body>

</html>

Example 2: how to add icons in html

<html>
<head>

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

   <!--Get your code at fontawesome.com-->
</head>
<body>

Tags:

Html Example