Your h2 element should be blue on this code

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="/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 (Linux; Android 6.0; Infinix_X521 Build/MRA58K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.109 Mobile Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-css/use-css-selectors-to-style-elements

You don’t have an h2 element. It says delete your h2 element’s style attribute and add this:

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

Not delete your h2 element.

I have tried this option but it didn’t work

Can you show me where you put this code in?

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

<h2>CatPhotoApp</h2>

It’s asking you to remove the inline styling of the html element and control It’s style with css.

you have removed the entire h2 tag, you only have to remove inline styling which you have given in your h2 tag

Your suggestions were helpful @naveen_coder And @Zachariahc. Thanks

1 Like