Please help me Basic CSS: Change the Font Size of an Element

please help me i dont know how to solve this please someone help

<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://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>

What is it exactly that you have a problem with? I do not see any code you would have tried to write to answer this exercise.

i restarted the code by mistake, been trying to get it back for like 2 hrs now

i dont under stand what is going on i can add the code that ive put later on for you if you want.

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

<h2 class="text-size">CatPhotoApp</h2>
<main>
  <p class="text-size">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 class="text-size">Things cats love:</p>
    <ul>
      <li>cat nip</li>
      <li>laser pointers</li>
      <li>lasagna</li>
    </ul>
    <p class="text-size">Top 3 things cats hate:</p>
    <ol>
      <li>flea treatment</li>
      <li>thunder</li>
      <li>other cats</li>
    </ol>
  </div>
1 Like

change text size to font size

oh my god im so dumb thank you

You're welcome. and not dumb either. hen u first start out, 99% of your mistakes are these kinda simple goofs.

Not dumb at all, the text and font properties are very easy to get mixed up in the beginning. From a non-technical, layman’s point of view, why not text-size? It is the size of the text we are trying to change after all. With better knowledge about fonts, some of the properties may make a little more sense.


Some more info, for you, or anyone else reading this, feel free to ignore:

Turns out, practically speaking, there are pretty much just 4 variations of each of the two properties you need to remember, in time they will become second nature to you.

List of properties with random, although common, values.

text-align: center;
text-decoration: none;
text-shadow: 1px 1px black;
text-transform: uppercase;

font-family: sans-serif;
font-size: 16px;
font-style: italic;
font-weight: bold;

Side note/tangent: A big help is the browsers developer tools, pick an element by right clicking and inspecting it. Under styles start to write the name of the property, say text, and a dropdown list of all the text properties shows up, once you have selected the property the same happens for the property values. If you are ever in doubt about the names of properties (or property values) it can be a good place to look and is very handy.

Because of the auto-completion and immediate visual feedback, it is my number one recommended way to both learn and work with CSS. Combined with DOM inspecting and the visual highlighting of element boxes with their margin and padding, it really does make CSS much more tangible and also provides visual learning.

ok, a little to smart for me. is this your job or do you just sit here and write in your free time

It’s certainly not my job, just trying to be helpful. And as i said, you are free to ignore most of what i wrote.

okey doky

making it 20

That’s what i’m lookin for Thanks:grinning: