Can you guide me on how to incorporate Font Awesome Icons in CSS? I am looking to add an icon after a heading for better customization.
Below is the code I have tried:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css"
integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin="anonymous" />
<title>Test</title>
<style>
* {
margin: 0;
padding: 0%;
box-sizing: border-box;
}
.main-div {
width: 100vw;
height: 100vh;
padding-top: 100px;
text-align: center;
}
h1 {
color: #2980b9;
font-size: 5rem;
}
h1::after {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: "\f007";
width: 20vh;
height: 25px;
color: #1abc9c;
font-size: 3rem;
display: inline-block;
margin: 0 auto;
}
</style>
</head>
<body>
<section class="main-div">
<h1>Test</h1>
</section>
</body>
</html>
However, I am facing issues as the icon does not appear. Could you please advise on the correct way to display the icon using css?
Your assistance would be greatly appreciated!