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**

.red-text {
  color: red;
.class=p {
  font-size: 16px

<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>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="">
  <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>
  **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 ;

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.