How do i turn my h2 element to become blue?

Tell us what’s happening:

Your code so far


<style>
h2  {
  color:blue;
  }   
</style>
<main>
<p>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="https://freecatphotoapp.com/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 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36.

Challenge: Use CSS Selectors to Style Elements

Link to the challenge:

Hello~!

It looks like your <h2> element has disappeared from your HTML code.

isnt it supposed to belike that?

If you have no <h2> element, how can it be blue? :slight_smile:

my head is spinning now. Please help

Okay, let’s get your code back to how it started. Go ahead and click the “Reset All Code” button, then the “Reset This Lesson” in the modal that pops up.

Once that is done, you can add your style code back at the top of the screen. This code is correct, so you are off to a great start.

<style>
h2  {
  color:blue;
  }   
</style>

Finally, you’ll see that your h2 text in the preview is still red. This is because the inline style on the <h2> element is overriding your style tags. You’ll need to remove only the style attribute on the <h2>, not the entire thing. :slight_smile:

thanks. l’ll do that