Change the font size

Change the font size
0

#1

How do I change the font size of the red text ? Yes, it’s simple to place the likes of this ,
h1 {font-size: 30px;}

but where ?


#2

In the .red-text class, add another line, and add the font-size property.


#3

Yes, what Flopet17 said.
You can include many “property: values” for one selector.
In this case, your selector is “.red-text”, your first property is “color” and your first value is “red”.
Your second property will be “font” and your second value will be “30xp”.
Put your closing curly bracket on it’s own line - that’s the usual convention.

selector  {
  property: value;
  property: value;
  property: value;
}

#4

Thank you for your help,
but it still isn’t working.

What is wrong with the following ? ignore the font size.


#5

edit: damn, i need to read slower ;/


#6

Take off the period in front of font-size. You only do a period when making a new class. so font-size:16px;
Also need to re-add the {}.
so:
.red-text {
color: red;
font-size: 16px;
}


#7

Thank you. I still must be missing something. Here is an updated image…


#8

I went back to that lesson to see for myself and the reason that isn’t working for you is because the requirement was for you to make a class to modify all paragraph elements and not to add it to your red-text class.
It should be:

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

#9

Thank you :slight_smile: Very much appreciated !!