Changing the Font Size Elements

Uhh, it’s the noob again D: it says:

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

I am completely lost though I’m sure the answer is staring me in the face. Can I get some halp plz?

#noob

  **Your code so far**

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

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

Challenge: Change the Font Size of an Element

Link to the challenge:

Hi @ApolloTurms,

You need to focus on the style part, so:

<style>
  .red-text {
    color: red;
  }
</style>

The challenge wants you to select the paragraph and put the size to 16px. You can follow the example of the course:

<style>
  h1 {
    font-size: 30px;
  }
</style>

That’s exactly what I did but do I nest in-between the first style element or do I create a h1 element nested in the style element or directly after it before the h2 element, or do I nest it anywhere between the main element?

Hello @ApolloTurms,

Your styling always goes between these <style>[your code here]</style> tags. The tags are opened like so: <style>, and closed </style>.

The elements themselves, for example the h2 element, go outside of these tags, and inside their own tags. Hope this helps?

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

The linguistics of this question are somewhat confusing.


FIRST : Inside the same <style> tag that contains your red-text class,
Create an entry for p elements

Here we have the <style> section:

<style>
  .red-text {
    color: red;
  }
</style>



SECOND: create an entry for p elements.

<style>
.red-text {
  color: red;
{

p {
}
</style>



THIRD : Set the p element font-size to 16 pixels (16px).

<style>
.red-text {
  color: red;
{

p { [INSERT YOUR FONT SIZING]
}
</style>
1 Like

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