How can i use a CSS Class to Style an Element h2 to red?

Tell us what’s happening:

Your code so far

   .red-text {
    color: red;
  h2 {
    color: red;

  <p>Click here to view more <a href="#">cat photos</a>.</p>
  <a href="#"><img src="" alt="A cute orange cat lying on its back."></a>
    <p>Things cats love:</p>
      <li>cat nip</li>
      <li>laser pointers</li>
    <p>Top 3 things cats hate:</p>
      <li>flea treatment</li>
      <li>other cats</li>
  <form action="/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>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36 OPR/62.0.3331.72 (Edition Campaign 34).

Link to the challenge:

In this way, but then you need to apply the class to the element (class="classname")

not working out after including
class=“classname”.red-text {

You have to add the class to the h2 element.

<h2 class="your-class-name"></h2>

The css was fine like it was, instead you need to give a class attribute to the element you want to style

<h2 class= .red-text { color: red; } .red-text { color: red; } h2 { color: red; }

not working out yet.

am sorry to over disturb you but failed to understand your text…the code please

Look my example. Just change your-class-name to red-text and that’s it :slight_smile:

<h2 class= red-text</h2>
just like the above…is not accepting

Nope, it’s differente, my friend. Details are key when programming :wink:

The h2 tag must be cloded properly and the name of the class must be between quotation marks.

<h2 class="your-class-name"></h2>

You need to add the attribute to the existing element

For example when we add a class of blue-text to a p element we would add class="blue-text" to the opening tag, like this: <p class="blue-text">

So in total

<p class="blue-text">Some random text</p>

<h2 class= red-text>CatphotoApp</h2>
not working out even after doing just like yours

<h2 class= red-text></h2>
this thing has become a pin in my flesh…
it’s still insisting.

Dude, just put some quotation marks around red-text


that’s it!!

You are missing the quotes plus don’t leave a space after class