HELP ON 17.Backup Values


#1

Until now, I do not get what you need to do for lesson 17...


#2

Backup values, otherwise known as fallbacks are values that will be applied if a preferred choice is not available. This is typically applied to font-family declarations. We write a comma separated list of font-family names in the order of preference from left to right. The left being the highest preference, and the right-most being the default family.

font-family: "Palatino Linotype", "Times New Roman", serif;

If this isn't helpful, then please post a link to the exercise and what you have written so far. Please include any error messages. Thanks.


#3

I think I am just brain dead but here is the link: https://www.codecademy.com/courses/web-beginner-en-TlhFi/2/5?curriculum_id=50579fb998b470000202dc8b


#4

In the stylesheet.css tab, add Times as an option before serif, Verdana as an option before sans-serif, and Vivaldi as an option before cursive.

When we start the lesson we are given the following style sheet to begin with:

h1 {
    font-family: serif;
}
h2 {
    font-family: sans-serif;
}
h3 {
    font-family: cursive;
}

The current fonts are generic families. CSS has five such groups.

Generic font families

Each OS comes out of the box with default fonts set on each of these families. It may be Times for serif, Arial for sans-serif, Courier for monospace, "Lucida Handwriting" for fantasy, and "Comic Sans" for cursive. This will vary from system to system or OS to OS.

For this reason, web designers always specify at least one actual font, and fall back on the generic family in the event that font isn't present on the client (user's) machine.

That is what this lesson is about. Choosing a font, and backing it up with a generic family.

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

#5

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