0
0
CSSmarkup~20 mins

Font weight in CSS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Font Weight Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding font-weight numeric values
Which CSS font-weight value will make the text appear bolder than normal but not as bold as the maximum weight?
Afont-weight: 900;
Bfont-weight: 400;
Cfont-weight: 100;
Dfont-weight: 600;
Attempts:
2 left
💡 Hint
Think about the numeric scale where 400 is normal and 900 is the boldest.
📝 Syntax
intermediate
2:00remaining
Correct font-weight syntax
Which CSS rule correctly sets the font weight to bold?
Afont-weight = bold;
Bfont-weight bold;
Cfont-weight: bold;
Dfont-weight: "bold";
Attempts:
2 left
💡 Hint
Remember the CSS property syntax uses a colon and no equals sign.
rendering
advanced
2:00remaining
Visual difference of font-weight values
Given this CSS, what will the text look like?
p { font-weight: 300; }
CSS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
p { font-weight: 300; }
</style>
<title>Font Weight Test</title>
</head>
<body>
<p>This text is light.</p>
</body>
</html>
AThe text appears very bold and thick.
BThe text appears lighter than normal, thinner strokes.
CThe text appears normal weight, neither bold nor light.
DThe text is invisible because font-weight 300 hides it.
Attempts:
2 left
💡 Hint
Lower numeric font-weight values produce lighter text.
selector
advanced
2:00remaining
Applying font-weight with class selectors
Which CSS rule will make all elements with class highlight have bold text?
A.highlight { font-weight: bold; }
B#highlight { font-weight: bold; }
Chighlight { font-weight: bold; }
D*highlight { font-weight: bold; }
Attempts:
2 left
💡 Hint
Class selectors start with a dot (.) in CSS.
accessibility
expert
3:00remaining
Accessibility impact of font-weight choices
Why is it important to avoid using very light font-weight (like 100 or 200) for body text in web design?
ABecause very light font-weight can reduce readability for users with low vision or on low contrast screens.
BBecause light font-weight causes the text to load slower in browsers.
CBecause light font-weight disables keyboard navigation on the page.
DBecause light font-weight makes the text unselectable by users.
Attempts:
2 left
💡 Hint
Think about how font thickness affects how easy it is to read text.