Use CSS Selectors to Style Elements i put the h2 element blue but it still shows "put your h2 element blue"? What is that I am missing?

Tell us what’s happening:

Your code so far



<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>
  <style>
  h2 {color: blue;}
  </style>
  <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.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36.

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

Delete only the style attribute of h2 element not the whole h2.

@msmahi7890 just add this:<style> h2 {color: blue;} </style>
and delete the style tag inside the h2 element …

Thanks but it does not work either.

h2 {color: blue; }

Things cats love:

Click here to view more cat photos.

A cute orange cat lying on its back.

<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>
Indoor Outdoor
Loving Lazy Energetic
Submit

1-Delete the style on h2:

< h2 style=“color: red”>CatPhotoApp</h2

it should look like this:

< h2>CatPhotoApp< /h2>

2- create style above the h2 like this:

< style>

h2{
color:blue;
}

Not helpful! The result remains the same.

h2 { color: red; }

Things cats love:

Click here to view more cat photos.

A cute orange cat lying on its back.

<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>
Indoor Outdoor
Loving Lazy Energetic
Submit

it should looks like this. you cannot put style where you want.

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

<h2>CatPhotoApp</h2>
<main>
1 Like

yes,i realized that silly mistake!thx