Need help on: Basic CSS: Change the Font Size of a Element lesson

Tell us what’s happening:
What did I do wrong? I was trying to make it so it will set text font size to 16px IF it was a “P” tag

  **Code so far**

<style>
.red-text {
  color: red;
}
.class=p {
  font-size: 16px
}
</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>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
</div>

<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>
  **Browser information:**

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14324.62.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.77 Safari/537.36

Challenge: Change the Font Size of an Element

Link to the challenge:

You just need to target the p element.

Below, I’ve listed how you can target the same element with different selectors
Let’s say we have a p element with a class ‘classForP’ and an id ‘idForP’

<p class='classForP' id='idForP'></p>

  1. selecting an element by tag name
p {
   color: black;
}
  1. selecting an element by class name
.classForP {
   color: black;
}
  1. selecting an element by id
#idForP {
   color: black;
}
1 Like

you forgot to close the p style tag with ;