CSS Element and Class Issues

Tell us what’s happening:
Im not quite sure what I need to do here. The instructions say my stylesheet should declare a “.red-text” class and set its color to red. Any help would be appreciated

Your code so far

<style>
  h2 {
    color: red;
  }
</style>
<h2 class="red-text">CatPhotoApp</h2>
<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 (X11; CrOS x86_64 9901.77.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.97 Safari/537.36.

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

If I need to have a class declaring “red-text”, where do I type this? I have tried entering things like .red-text class=“red-text”>CatPhotoApp

.
Do I need to do this differently or what am I messing up?
Your help is highly appreciated.

I checked out another person with this same problem and tried their code with one addition and it seemed to work. I do have a question about why one piece of code is needed then.

 h2 {
    color: red
  }
If that code is already written, why is this code here applicable?
  h2 .red-text  {
    color: red;
  }

Thanks for the support. Ill try and come back here if I have any more questions.