Use an h2 CSS selector: freeCodeCamp Tutorial

As I am learning and taking the tutorial, I am using the following in my style tag ...

h2 {
    font-family: Lobster, "Open_Sans";
  }

When I test I get the following error ...

// running tests
Use an h2 CSS selector to change the font.
// tests completed

My font changes, I just do not understand what the issue is and everything I have tried, meaning enter a CSS selector, I still get the above erorr ???

So what am I missing ????????????????????????????

***************************************** code below I am using ***************************************
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

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

  p {
    font-size: 16px;
    font-family: monospace;
  }
  h2 {
    font-family: Lobster, "Open_Sans";
  }
  
</style>


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

<main>
  <p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>
  
  <a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
  
  <div>
    <p>Things cats love:</p>
    <ul>
      <li>cat nip</li>
      <li>laser pointers</li>
      <li>lasagna</li>
    </ul>
    <p>Top 3 things cats hate:</p>
    <ol>
      <li>flea treatment</li>
      <li>thunder</li>
      <li>other cats</li>
    </ol>
  </div>
  
  <form action="/submit-cat-photo">
    <label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
    <label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
    <label><input type="checkbox" name="personality" checked> Loving</label>
    <label><input type="checkbox" name="personality"> Lazy</label>
    <label><input type="checkbox" name="personality"> Energetic</label><br>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
</main>

You can replace the " " of the Open Sans font with ’ ’ and check.

https://learn.freecodecamp.org/responsive-web-design/basic-css/import-a-google-font/

Here is the assignment …

Create a font-family CSS rule that uses the Lobster font, and ensure that it will be applied to your h2 element.

Obviously I am not understanding the question because when I apply the β€œh2” in my style tag the font changes. Again, I have no idea what I am suppose to do here ?

Any assistance with the error I would be grateful.

Thank you.

Tom

  h2 {
    font-family:Lobster;
  }

please try this
1 Like

The question asks you to use β€œLobster” font (which is not available in the default library of html) for the β€œh2” heading element.