H2 selector css problem/error message

Tell us what’s happening:
In the below code whenever I am running it is showing the following error message:
“> Your h2 element should be blue.”
If you look down in code it is already colored in blue but then too it is showing the above message again and again.
please look into the problem and tell me the solution.
thankyou.

Your code so far


<style>
h2 {
color: blue;
}
</style>
<h2>CatPhotoApp</h2>
<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>

Challenge: Use CSS Selectors to Style Elements

Link to the challenge:

Hey, couldn’t find the problem. Your code worked well tho. Maybe browser thing.

1 Like

why is it not working on the freecodecamp tutorial where you are given space to practice
i am facing this problem from last 2 days.

Sorry, I don’t get your point :wink:
Still not working?

You probably have a browser extension that changes your CSS, such as a dark mode extension. I recommend disabling your extensions that interfere with CSS on FCC and instead using the native dark mode that you can activate in the settings.

1 Like
h2 { color: blue; }

The above is the part of the code in which the error is coming.
I was learning the CSS topic from freecodecamp tutorial in which I was learning the following topic:

Basic CSS: Use CSS Selector to style elements.

When I started to solve the challenge it asked me to perform following in my code:

1>The style attribute should be removed from your h2 element.

2>You should create a style element.

3>Your h2 element should be blue.

4>Your stylesheet h2 declaration should be valid with a semicolon and closing brace.

5>All your style elements should be valid and have closing tags.

All the points got a correct tick except 3rd point. It got crossed and the error message was displayed

“your h2 elements should be blue”.

Although it is showing the h2 element blue in the displaying result area this cross is not going away.

Please help.

I hope this description of the whole problem would be helpful for you.

Thank you.

Waiting for your reply with a solution.

Did you check that you are not using a browser extension that changes your CSS, such as a dark mode extension?

1 Like

Yup i have a browser extension and as you advised me to disable it i have done it .
I also reset all my code and again typed the solution but still the same problem and the error message :

“Your h2 element should be blue”

Have you tried a different browser or using incognito mode?

1 Like

no not yet.
okk let me try the incognito mode

Thanks a lot Jeremy sir.
Incognito mode worked.
:sweat_smile:
This sounds akward and might be possible that you think about me like"what a disgusting guy he is "
but truly i wanted to ask you how did you tackle out the solution.
could you please explain it a little briefly sir.Please :sweat_smile:

1 Like

Sometimes browser settings get messed up a little bit. We’ve seen on the forum that the three things that tend to work whenever code that passes on one person’s browser doesn’t pass on someone else’s browser are

  1. Turn off extensions
  2. Incognito mode
  3. Different browser

Incognito mode is sort of like a temporary browser reset that turns off all of the changes you have made for your personal preferences in your browser - it turns off extensions and resets some settings in your incognito tab. This usually fixes whatever little thing was confusing the FCC test suite.

:astonished: hmm…
I really didn’t knew that.
Thank you Jermey Sir. :smile:

1 Like