Use CSS Selectors to Style Elements. I need some help here

Use CSS Selectors to Style Elements. I need some help here
0.0 0

#1

Tell us what’s happening:
My code is in the first three lines, but it doesn’t seem to be working. Can anyone figured out what’s wrong here?

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 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36.

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


#2

You appear to have deleted the h2 element which was present in the original code. I suggest clicking the Reset All Code button to reset the challenge to it’s original state and then add the CSS selector as you did above.


#3

Hi Randell,

Thanks for your answer! I appreciate it. I think this is what you were saying, but it still isn’t working? The first three lines are my new code. It keeps telling me that my h2 element still isn’t blue:

CatPhotoApp

Click here to view more cat photos.

A cute orange cat lying on its back.

Things cats love:

  • cat nip
  • laser pointers
  • lasagna

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
Indoor Outdoor
Loving Lazy Energetic
Submit

#4

EDIT: Sorry, I copied and pasted the code. This is MY new code:

CatPhotoApp


#5

EDIT AGAIN: MY new code is

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

#6

Look at the example they show you in the lesson. Do you see any < > or or text in the example?

Create applicable h2 selector in the style section. If done properly, the h2 element will look like below and the font color will be blue.

<h2>CatPhotoApp</h2>