I have done all correct but it does not work.why?

Tell us what’s happening:

Your code so far

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

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Linux; Android 6.0.1; SM-J500G Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36.

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

I believe that your red-text class is not supposed to be specific to h2 elements. The h2 just happens to be the element that is using it.

Yeah,first time i tried by difrently.but result are same as now

Without seeing your code, we can’t tell you what is wrong with it.

@Foysal

It might be a little confusing that it is expressed this way:
image

The intention is not to use an element selector in this exercise, but rather use the class selector.

Therefore, the problem is in this area . . .
h2.red-text{

The goals help to clarify, step by step (perhaps the first goal could be the last goal):
image

Which is what was being addressed by the esteemed @ArielLeslie, not to take away from that.

Cheers,
-WWC