0
0
CSSmarkup~20 mins

Font family in CSS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Font Family Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📝 Syntax
intermediate
2:00remaining
What is the output of this CSS snippet?
Given the CSS below, what font will the paragraph text use if the user's system does not have 'Comic Sans MS' installed but has 'Arial'?
CSS
p {
  font-family: 'Comic Sans MS', Arial, sans-serif;
}
AThe text will not display any font.
BThe text will use 'Comic Sans MS' font.
CThe text will use the browser default serif font.
DThe text will use 'Arial' font.
Attempts:
2 left
💡 Hint
The browser tries fonts in order until it finds one installed on the system.
🧠 Conceptual
intermediate
1:30remaining
How many font families are specified in this CSS rule?
Look at the CSS below. How many font families are listed in the font-family property?
CSS
h1 {
  font-family: 'Times New Roman', Georgia, serif;
}
A3
B1
C4
D2
Attempts:
2 left
💡 Hint
Count each font name or generic family separated by commas.
selector
advanced
2:00remaining
Which CSS selector applies the font-family only to paragraphs inside a section with class 'intro'?
Choose the correct CSS selector to apply font-family only to <p> elements inside <section class="intro">.
Asection.intro p { font-family: Arial, sans-serif; }
Bp.section.intro { font-family: Arial, sans-serif; }
C.intro > p { font-family: Arial, sans-serif; }
Dsection p.intro { font-family: Arial, sans-serif; }
Attempts:
2 left
💡 Hint
Think about how to select paragraphs inside a section with a specific class.
layout
advanced
2:00remaining
What visual effect does this CSS produce on the text?
Consider the CSS below applied to a heading. What will the user see?
CSS
h2 {
  font-family: 'Courier New', monospace;
  font-weight: bold;
  font-style: italic;
}
AThe heading text appears bold but not italic in a sans-serif font.
BThe heading text appears bold and italic in a monospace font.
CThe heading text appears normal weight and style in a serif font.
DThe heading text appears italic but not bold in a cursive font.
Attempts:
2 left
💡 Hint
Look at font-family, font-weight, and font-style properties.
accessibility
expert
2:30remaining
Which font-family choice best supports accessibility for users with dyslexia?
Which font-family option below is considered best practice to improve readability for users with dyslexia?
A'Comic Sans MS', cursive, sans-serif
B'Arial Black', sans-serif
C'Open Dyslexic', Arial, sans-serif
D'Times New Roman', serif
Attempts:
2 left
💡 Hint
Some fonts are specially designed to help dyslexic readers.