Home  >  Q&A  >  body text

Why doesn't my icon show up in the HTML but instead shows a bordered square?

<p>As the title states, I used the FontAwesome website to get an icon and then tried to display it using the following code: </p> <p><br /></p> <pre class="snippet-code-html lang-html prettyprint-override"><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></code></pre> <p><br /></p> <p>I tried using fa-xl class to make it bigger and just add fa class. But this didn't work either. </p>
P粉842215006P粉842215006450 days ago594

reply all(1)I'll reply

  • P粉567112391

    P粉5671123912023-07-28 15:07:04

    I've fixed your HTML and removed the fa-regular class.


    <!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>


    reply
    0
  • Cancelreply