Challenge - 5 Problems
Font Size and Scaling Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Understanding Tailwind's font size scale
Which Tailwind CSS class sets the font size to approximately 1.25rem (20px) by default?
Attempts:
2 left
💡 Hint
Tailwind uses a scale where text-base is 1rem, and sizes increase or decrease from there.
✗ Incorrect
The text-xl class sets the font size to 1.25rem (20px) by default. text-lg is 1.125rem (18px).
📝 Syntax
intermediate2:00remaining
Correct Tailwind syntax for responsive font size
Which option correctly applies a font size of 1rem on small screens and 1.25rem on medium screens using Tailwind CSS?
Attempts:
2 left
💡 Hint
Tailwind uses breakpoint prefixes like
md: to apply styles at medium screen sizes and above.✗ Incorrect
Option A uses the correct breakpoint prefix md: to change font size from text-base (1rem) to text-xl (1.25rem) at medium screens.
Other options either use invalid class names or incorrect breakpoint usage.
❓ rendering
advanced2:00remaining
Visual effect of font size scaling with rem units
If the root font size is set to 16px, what will be the computed font size in pixels for an element with class
text-2xl in Tailwind CSS?Attempts:
2 left
💡 Hint
Tailwind's
text-2xl corresponds to 1.5rem by default.✗ Incorrect
Since 1rem equals 16px, 1.5rem equals 24px. Tailwind's text-2xl sets font size to 1.5rem, so the computed size is 24px.
❓ selector
advanced2:00remaining
Selecting font size with Tailwind's arbitrary values
Which Tailwind class correctly sets the font size to exactly 22px using arbitrary values?
Attempts:
2 left
💡 Hint
Tailwind allows arbitrary values inside square brackets for many utilities.
✗ Incorrect
Option D uses the correct syntax for arbitrary values: text-[22px].
Other options are invalid Tailwind class names.
❓ accessibility
expert2:00remaining
Ensuring accessible font scaling with Tailwind
Which approach best supports user accessibility preferences for font scaling in Tailwind CSS?
Attempts:
2 left
💡 Hint
Accessibility means respecting user settings and allowing text to scale properly.
✗ Incorrect
Using relative units like rem allows font sizes to scale with user preferences and browser settings, improving accessibility.
Fixed pixel sizes or disabling zoom harm accessibility.