Change the Font Size of an Element HELP!

I’m a little stuck on this challenge. Can anyone help with where I am going wrong. Not sure where the font size is supposed to go.

Your code so far


<style>
  
  .red-text {
    color: red; 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://bit.ly/fcc-relaxing-cat" 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="/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 browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.75 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-css/change-the-font-size-of-an-element

It says you need to create an entry for all p tags in your style tag, add the font size. So you need inside of style

p{
font-size:16px;
}

1 Like

you kind of got it correct

just move the font-size line to its own separate line underneath the color line and place a semi-colon ; at the end.

sorry one more correction
according to the challenge they want:

Inside the same tag that contains your red-text class, create an entry for p elements and set the font-size to 16 pixels (16px).

So you need to put the font-size line inside a ‘p’ selector, not inside the ‘.red-text’ selector.

Screenshot_4
Use this way

1 Like

make sure you don’t leave a space in between ‘font-size’ and :

font-size: 16px;
1 Like

Thanks. Got it :slight_smile: I appreciate the help.

2 Likes