Basic CSS - Use a CSS Class to Style an Element

Tell us what’s happening:
Describe your issue in detail here.

Your code so far



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

<h2 class="red-text">CatPhotoApp</h2>
<main>
  <p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>

  <a href="#"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>

  <div>
    <p>Things cats love:</p>
    <ul>r
      <li>catnip</li>
      <li>laser pointers</li>
      <li>lasagna</li>
    </ul>
    <p>Top 3 things cats hate:</p>
    <ol>
      <li>flea treatment</li>
      <li>r</li>
      <li>other cats</li>
    </ol>
  </div>
 <p style="color:red"> things cat
  <form action="https://freecatphotoapp.com/submit-cat-photo">
    <label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
    <label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
    <label><input type="checkbox" name="personality" checked> Loving</label>
    <label><input type="checkbox" name="personality"> Lazy</label>
    <label><input type="checkbox" name="personality"> Energetic</label><br>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
</main>






    

Your mobile information:

SM-M135FU - Android 14 - Android SDK 34

Challenge: Basic CSS - Use a CSS Class to Style an Element

Link to the challenge:

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.
Learning to describe problems is hard, but it is an important part of learning how to code.
Also, the more you say, the more we can help!

Welcome to the forum @Snehlata123

Inside your style element, change the h2 selector to .red-text and update the color’s value from blue to red .

You correctly change the colour value.
You also need to update the selector.

For next time, describe the issue in your own words. Learning to communicate problems is a part of becoming a web developer.

Happy coding