skip to Main Content

As aforementioned in the title, I used the website FontAwesome to get an icon I then attempted to display this with the following code:

<!DOCTYPE html>
<html>
<head>
<title>Loading....</title>
<link rel="stylesheet" href="./starting.css"></link>
</head>
<script src="https://kit.fontawesome.com/1f2023aaf1.js" crossorigin="anonymous"></script>
<body>
<i id="fa" class="fa fa-regular fa-spinner fa-xl"></i>"></i>
</body>
</html>

I tried making it bigger with fa-xl and just adding the fa class. But that didn’t work either.

2

Answers


  1. You are adding some extra links

    <!DOCTYPE html>
    <html>
    <head>
        <title>Loading....</title>
        <link rel="stylesheet" href="./starting.css"></link>
        <script src="https://kit.fontawesome.com/1f2023aaf1.js" crossorigin="anonymous"></script>
    </head>
    <body>
        <i id="fa" class="fa fa-regular fa-spinner fa-xl"></i> <!-- this was modified -->
    </body>
    </html>
    
    Login or Signup to reply.
  2. I fixed your html and remove fa-regular

    <!DOCTYPE html>
    <html>
    
    <head>
      <title>Loading....</title>
      <link rel="stylesheet" href="./starting.css">
      <script src="https://kit.fontawesome.com/1f2023aaf1.js" crossorigin="anonymous"></script>
    </head>
    <body>
      <i id="fa" class="fa fa-spinner fa-xl"></i>
    </body>
    </html>
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search