Help on "h2 CSS selector to change the font."

Tell us what’s happening:
the test tells me that i should use a h2 css selector to change it. I have no idea what is the correct way.

Your code so far


<link href="https://fonts.googleapis.com/css?family=Lobster&display=swap" rel="stylesheet">

<style>

h2 {
  font-family : Lobster; 
}

.red-text {
  color: red;
}

p {
  font-size: 16px;
  font-family: monospace;
}
</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>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36.

Challenge: Import a Google Font

Link to the challenge:
https://www.freecodecamp.org/learn/responsive-web-design/basic-css/import-a-google-font

Welcome to forum!

You have an extra space between property name and colon

Hope it helps! :slight_smile:

1 Like

Hello c0dedmessage,

I couldn’t find a mistake so I copy & pasted your code into my curriculum and on my end it’s working :confused:

Maybe try refreshing your browser.

2 Likes

Testing this: The code did not work for me (Chrome), but removing the extra space did work for me.

1 Like

Thanks!!!
it totally work for me here. i wonder why it doesnt work when it has spaces.

when it’s like that the test is checking what you have written and it expects to use the convention of property: value, with spaces like that