Use a CSS Class to Style an Element''

Tell us what’s happening:
Your stylesheet should declare a red-text class and have its color set to red.?

Your code so far

<style>
  h2 {
    color:red;
  }
</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/65.0.3325.181 Safari/537.36.

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

You need to add to your h2 the following class: red-text

write the class inside the tags with - color: red; - and after that add it to your h2 like so:
h2 class=“red-text”

You are indeed applying a red color to h2 headers, but you are asked to create a new class, which has red color as a property, and apply it to another element (h2, maybe p). What you’re doing is straight applying a red color to an html element.

<style>
  redText {
    color:red;
  }
</style>

<h2 class="redText">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>