"h2 element should be blue" error in CSS basic

why i am getting this error?
My code is okay and perfect but still am getting this error i don’t know but i think their is writing error in my code

  **check my code**

h2 {
color: blue;
<p>Click here to view more <a href="#">cat photos</a>.</p>

<a href="#"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>

  <p>Things cats love:</p>
    <li>cat nip</li>
    <li>laser pointers</li>
  <p>Top 3 things cats hate:</p>
    <li>flea treatment</li>
    <li>other cats</li>

<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>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36

Challenge: Use CSS Selectors to Style Elements

Link to the challenge:

1 Like

Sorry, that first reply I was not paying attention. Your code for the h2 to be blue is correct. However, where you placed your h2 catphototapp text is not. Your h2 text is above the main tag, it needs to be below the main tag and the code will pass the test

Hi Ankur,

Yes, your code is okay but it’s not semantically correct. The h2 tag should be inside the main tag. Try that and I believe it will correct the error.

no its not working it shows same error

Hi @Ankur-Rohilla !

Welcome to the forum!

The code you have shared works on my end. Please ensure that you have disabled any extensions that interface with the freeCodeCamp website (such as Dark Mode and Ad Blocker), and set your browser zoom level to 100%. Both of these factors can cause tests to fail erroneously.

1 Like

yah thankyou very much now its working

by the way can you please tell me why these extensions create intruption in FCC

These extensions like ad blocker or dark mode have always caused problems for users.
I am not sure why it messes with the tests but our solution to campers is to just remove extensions when going through the challenges.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.