I tried to use an icon from font awesome but it’s not working, i copied the script link and pasted it to the head tag but it’s just showing a box.
Note: I added the actual kit number, I’m just hiding it here. You can check the image. Screenshot
<head>
<title>Page Title</title>
<script src="https://kit.fontawesome.com/my-kit-number.js" crossorigin="anonymous">
.
</script>
</head>
<body>
<i ></i>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
CodePudding user response:
the reference to 'my-kit-number' is wrong you need to go here: https://fontawesome.com/start and add an email so then you can receive a valid script source replacing 'my-kit-number' for a valid id
CodePudding user response:
The either .fa
or .fas
must be used. No need for a kit this example is using a free CDN.
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
<style>
:root {
font: 2ch/1 Consolas
}
</style>
</head>
<body>
<p><i ></i> </p>
<p><i ></i> </p>
</body>
</html>