Im having trouble getting the selector for h2 to convert to font-family: lobster;

Tell us what’s happening:

Your code so far



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

  p {
    font-size: 16px;
    font-family: Monospace;
  }
  
  .h2{
   font: 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>

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36.

Link to the challenge:
https://www.freecodecamp.org/challenges/import-a-google-font

The red tests say:

Import the Lobster font.

There’s a <link> element snippet in the instructions that allows you to import the Lobster font to your page. Copy that to your code (preferably at the top).

Your h2 element should use the font Lobster.

You have two problems here. First, the .h2 in the CSS should be h2 (no dot). The former will not style <h2> elements, but rather style any element with "h2" in its class list. Second, font should be font-family.

1 Like