Importing google fonts

I dunno why google fonts not working in my code. I just copied the link provided and pasted it between the of my html. I’m doing the tribute page project.

html

<!DOCTYPE html>
<html lang="en">
  <head>
    
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title id="title">Tribute Page Project</title>
    <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins&family=Roboto+Slab&display=swap" rel="stylesheet"> 

    <link rel="stylesheet" href="styles.css"> 
 
  </head>
  <header>
    <div id="header-div">
      <img class="himage" src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/39/FreeCodeCamp_logo.png/800px-FreeCodeCamp_logo.png?20191220141126" alt="fcc logo">
    </div >
    <h2 class="header-h2">Build a Tribute Page</h2>
  </header>

css

.header-h2 {
  font-family: 'Roboto Slab', serif;
  font-size: 2rem;
}

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.