Search code examples
htmlcssfont-awesome

Font Awesome not all icons showing


I'm using font awesome CDN to use the icons but not all icon do show, i put 2 examples of 2 icons, the first one shows and the second does not, it rather shows as an X inside a square, what is going on ?

<!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" />
    <title>Alarabiyah | Breaking News From Around The World</title>

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css"                
    integrity="sha512-  
    xh6O/CkQoPOWDdYTDqeRdPCVd1SpvCA9XXcUnZS2FmJNp1coAFzvtCN9BmamE+4aHK8yyUHUSCcJHgXloTyT2A=="    
    crossorigin="anonymous" referrerpolicy="no-referrer" />

    <link rel="stylesheet" href="styles.css" />
  </head>
  <body>
    <header class="header">
      <div class="header__top">
        <div class="header__top-logo-container">
          <img src="logo.png" alt="logo" class="header__top-logo-image" />
        </div>
        <div class="header__top-controls">
          <i class="fa-solid fa-magnifying-glass"></i> // SHOW
          <i class="fa-regular fa-magnifying-glass"></i> // SHOWS AS AN X INSIDE A SQUARE
          <div class="header__top-theme"></div>
        </div>
      </div>
    </header>
  </body>
</html>

i have tried using different CDNs, i've also used the Font Awesome Kit, but it doesn't change anything


Solution

  • It is because "fa-regular fa-magnifying-glass" is not free. You can check this out using below link:

    Font awesome free icons