Trying to use css to style an element

**Tell us what’s happening: Ihave tried everything exceept inline which it says not to do need help please

not working i no im doing something wron cant figure it out

Your code so far

<h2 class= "red-text"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 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36.

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

You need to add the red-text class in the existing <h2> element. Then in your styles, add a rule for the red-text class to make it red.

ok but i thought that was inline

Inline styles refer to putting the CSS code in the element itself (like <h2 style="color:red">I am red</h2>). Adding classes to an HTML element is not the same as adding inline styles. Then in your stylesheet, you can put CSS rules to style elements with a certain class, as you’ll do with this challenge.

Tell us what’s happening: still cant get it right

Your code so far



<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 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36.

Link to the challenge:

There should be a <style> element in this challenge’s initial code. Did you remove it by any chance?

Also, red text should be red-text. Otherwise, it will be interpreted as two classes red and text.

And to style classes, you add this to your stylesheet. Notice the . at the beginning.

.class-name {
  property: value;
}

thank you guys for the help I was getting confused