Css element not working

Tell us what’s happening:
Hi, can anyone tell me why this code isn’t working? I’ve tried so many versions, even copy and paste from the info and none of it seems to work. Nor did the previous 2 CSS tutorials.

Your code so far


<style>
.red-text {
  color: red;
}
</style>
<h2>class="red-text">CatPhotoApp</h2>
<h2>CatPhotoApp</h2>
<main>


**Challenge:** Use a CSS Class to Style an Element

**Link to the challenge:**
https://www.freecodecamp.org/learn/responsive-web-design/basic-css/use-a-css-class-to-style-an-element
1 Like

you need to place the class=“red=text” inside the <> with h2.
Basically delete the > after h2 and you have it.

Thank you so much, that’s done it.