Use a CSS Class to Style an Elementy

Tell us what’s happening:

Your code so far

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

<h2>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>

Your browser information:

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

Link to the challenge:
https://www.freecodecamp.org/challenges/use-a-css-class-to-style-an-element

Hi yasinelshamy, the example challenge is using blue for the link color. In order to get the challenge to pass, set the link color to red and add the red-text class to your stylesheet.

AND remember to hit “Run”! It took me awhile to figure out why it was telling me I didn’t have everything right. Then it dawned on me, I hadn’t run the program!

all you need to do that, just replace
h2 {
color: blue;
}
with
.red-text{
color:red;
}
and pass this class as h2 class=“red-text”