Not sure what I'm getting wrong!

I thought that I needed to add the font-family into the style class, but that didn’t work. What am I doing wrong?!

  **Your code so far**

.red-text {
  color: red;

p {
  font-size: 16px;
p {font-family: monospace;}

<h2 class="red-text">CatPhotoApp</h2>
<p class="red-text">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 class="red-text">Things cats love:</p>
    <li>cat nip</li>
    <li>laser pointers</li>
  <p class="red-text">Top 3 things cats hate:</p>
    <li>flea treatment</li>
    <li>other cats</li>

<form action="">
  <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; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0

Challenge: Set the Font Family of an Element

Link to the challenge:

Two things:

  1. You added the class “red-text” to all the p elements. Why did you do that? That is causing the tests to fail.
  2. It would make more sense to just add the font-family to the existing p element in the style section. That does not break the test, but would make more sense.

When I fix that first one, the code passes for me.

  1. That was already in the code
  2. That’s what I did first and it didn’t work

But I took your advice and deleted it, and the code worked.

I’m a bit confused about why the code was in there in the first place? Just to be deleted?

Yeah, I don’t get it. If I reset the code and do it right it works. There must be some subtle change that got made by accident. I wouldn’t worry about it.

Thank you for your help. I’m realising that learning to code will take some patience!