Lesson:17 Backup Values


#1




Oops, try again. Did you remember to put Verdana and a comma between font-family and sans-serif?


h1 {
font-family: Times, Serif; Verdana,Sans-serif; Vivaldi, Cursive; 
}
in stylesheet.css


#2

I'm not sure how to correct the quote reply or error response in the HTML format I typed in.


#3

Separate each one with a comma, and only put a semi-colon on the end :slight_smile:


#4

I did do exactly what you told me, but I still got the same error message as before


#5

Could you post the updated code?


#6

h1 {
font-family: Times, serif; Verdana, sans-serif; Vivaldi, cursive;
}


#7

Replace these semicolons with commas. Only do a semicolon at the end. Like so:

Times, serif, Verdana, sans-serif, Vivaldi, cursive;

#8

h1 {
font-family:Times, serif, Verdana, sans-serif, Vivaldi, cursive;
}

Did the code again with your requested changes, it is still giving me the same exact error as before.


#10

Could you post a link to the lesson you are on, as well as the full CSS code?


#11

Hi,

You can't have all the fonts for one tag.
Put two fonts per tag.

eg. two fonts for p two for h2 ect.


#12

I solved the problem using the font-family property separately. For example,
h1 {
font-family:Times, serif;
font-family:Verdana, sans-serif;
font-family:Vivaldi, cursive
}

Thanks so much!!!


#13

The instructions on the lesson is a bit tricky

You're welcome :green_heart:

Happy Learning :slight_smile:
Happy coding !

What inspired you to learn programming/coding?
Join the discussion


#14

The lesson let you pass, but that is the the correct way.
@quobogeba @brysonsnow1 I'm going to explain what you need to do in this lesson if you don't understand me drop a comment :slight_smile:

In this lesson if you check your HTML tab you will see three tags (h1, h2, h3)

<h1>I'm going to be a serif font when I grow up!</h1>
<h2>I'm going to be a sans-serif font.</h2>
<h3>I'm going to be in cursive!</h3>

All three tags have no styling to it so we are going to add a font as well as a backup font.

Under the CSS tab we going to select each tag (separately) and add a font and backup font to each one.

This is the result you will see


The reason for having two or more fonts added which is backup fonts is: if the first font is not supported by the user it will take the second one ect.



Lesson:17 Backup Values
#15

For some reason, I remembered you could do more than 2 font-families in one like so:

div {
   font-family: Verdana, serif, sans-serif;
}

I'm assuming this is incorrect?


#16

That is correct, you can have more than one backup font..
This lesson requires you to add the fonts on three elements not all on one..


#17

Oh, okay, that makes sense! Thank you for explaining, and for being patient with me.


#18

2 posts were split to a new topic: Lesson:17 Backup Values


#19