freeCodeCamp: Use CSS Class to Style an Element - h2 is not red even though I have the other 3 requirements checked off.

Use CSS Class to Style an Element - h2 is not red even though I have the other 3 requirements checked off.

Red X - Your h2 element should be red. Green Checkmark - Your h2 element should have the class red-text. Green Checkmark - Your stylesheet should declare a red-text class and have its color set to red. Green Checkmark - Do not use inline style declarations like style=“color: red” in you

Challenge Name - Use CSS Class to Style an Element

I’m using Chrome on an Android phone.

Here’s my code:

 <style>
  h2 .red-text  {
    color: red;
  }
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

I have a programmer friend who entered exactly what I have entered in a computer and it was accepted and he got all green checkmarks.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 17 (3 by maintainers)

Most upvoted comments

You need to replace h2 with .red-text currently you have both (drop the h2) h2 .red-text - For more, help room is good for stuff like this. Also, <br> shouldn’t be added to your code (unless that’s just some side effect of you posting from phone to issue)