Font Awesome V4 - Basic Use Example
Using Font Awesome Icons within a web page is super easy, where we need to include the icon library CDN within the head section of a document and access all icons using the icon classes.
Here is the example, where we have included two Font Awesome Icons from the library.
- Used the
<i>element to include thecubesicon by including the classfaandfa-cubes. - Used the
<span>element to include theusersicon by including the classfaandfa-users.
<!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-cubes"></i>
<span class="fa fa-users"></span>
</body>
</html>
Overall
This example helps us understand the basic use of Font Awesome Icons within an HTML document.