A. Missing comma between 'Helvetica Neue' and sans-serif
B. Quotes around 'Helvetica Neue' are incorrect
C. Arial should be in quotes
D. Font-family property cannot have more than two fonts
Solution
Step 1: Check font list syntax
Font names must be separated by commas. Here, there's no comma between 'Helvetica Neue' and sans-serif.
Step 2: Confirm quotes and other syntax
Quotes around 'Helvetica Neue' are correct; Arial does not need quotes; multiple fonts are allowed.
Final Answer:
Missing comma between 'Helvetica Neue' and sans-serif -> Option A
Quick Check:
Font names must be comma-separated = A [OK]
Hint: Always separate font names with commas [OK]
Common Mistakes:
Forgetting commas between font names
Misusing quotes around single-word fonts
Thinking font-family limits number of fonts
5. You want to ensure your webpage text uses the font 'Open Sans' if available, otherwise falls back to Arial, then any sans-serif font. Which CSS rule correctly achieves this?
hard
A. font-family: Open Sans, Arial, sans-serif;
B. font-family: 'Open Sans', 'Arial', serif;
C. font-family: 'Open Sans', Arial, sans-serif;
D. font-family: 'Open Sans' Arial sans-serif;
Solution
Step 1: Use quotes for multi-word font names
'Open Sans' has a space, so it must be in quotes.
Step 2: Separate fonts with commas and use generic family without quotes
Fonts must be comma-separated. Arial is a single word and does not need quotes. The generic family sans-serif should not be quoted.
Final Answer:
font-family: 'Open Sans', Arial, sans-serif; -> Option C
Quick Check:
Quotes for multi-word + commas + generic unquoted = D [OK]
Hint: Quote multi-word fonts, separate with commas, generic unquoted [OK]