Between the style tags, give the p elements font-size of 16px. Browser and Text zoom should be at 100%

Between the style tags, give the p elements font-size of 16px. Browser and Text zoom should be at 100%
0

#1
<style>
  .red-text {
   <p>font-size: 16px</p>;
    color: red;
  }
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p> Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

#2

I cleaned up your code.
You need to use triple backticks to post code to the forum.
See this post for details.

To style an element, you add this to the stylesheet:

element {
  ... styles go here ...
}

You don’t add tags in stylesheets, like you did in your code


#3

Can you please type in the exact code here? Still I am unable to understand the mistake


#4

If you wanted to give <p> elements a 16px font size, you’ll add this in your stylesheet:

p {
  font-size: 16px;
}

#5

This is the correct way.


#6

It’s not. Only elements with class red-text will have 16px size.

What is asked is to have elements with class red-text in red, all p elements of size 16px and no class attribute on the second p.


#7

Oh ok didn’t read it all the way through :stuck_out_tongue:


#8

Ha ha
Such a classic!


#9

@Learner
check out this solution add new p selector in stylesheet in which it should contain font-size=16px;

<style>
  .red-text {
    color: red;}
    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://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>