Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
A. Because commonly available fonts are either bold or they aren't, and since there is only one variation, bold and normal, the other values aren't used.
p {
font-family: Arial, sans-serif;
font-weight: bold;
font-size: 24px;
color: crimson;
}
p.copy {
font-style: italic;
font-weight: bold;
line-height: 2em;
}
p#footer {
font-size: 12px;
line-height: 2em;
font-family: Helvetica, Arial, sans-serif;
}
A.
p {
font: bold 24px Arial, sans-serif;
color: crimson;
}
p.copy {
font-style: italic;
font-weight: bold;
line-height: 2em;
}
p#footer {
font: 12px/2em Helvetica, Arial, sans-serif;
}
The second rule, which begins with the selector p.copy, had no change, because there is no font-size and no font-family specified in the rule, which are both required for the font shorthand property. Another acceptable approach would be to repeat the font-size and font-family as defined in the first rule, since it applies to all <p> elements. If you repeated the font-size and font-family from the first rule, another acceptable answer would be:
p.copy {
font: italic bold 24px/2em Arial, sans-serif;
}