Importing Google Font

Hello,

I am able to call the font, but not able to apply it to h2. Did I apply the font correctly or do I need to add it to the h2 tag?

<style>
  .red-text {
    color: red;
  }

  p {
    font-size: 16px;
    font-family: Monospace;
  }
  
  <link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
  
  h2 {
    font-family: Lobster;
  }
  
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

You need the link to the font at the beginning of your code.

1 Like

Thanks Hilary! That worked

I cleaned up your code.
You need to use triple backticks to post code to the forum.
See this post for details.