0
0
Tailwindmarkup~20 mins

Responsive typography scaling in Tailwind - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Responsive Typography Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Tailwind's responsive typography classes
Which Tailwind CSS class correctly applies a font size of 1.25rem on small screens and scales up to 1.5rem on medium screens and larger?
Atext-lg md:text-xl
Btext-base md:text-2xl
Ctext-sm md:text-lg
Dtext-xl md:text-2xl
Attempts:
2 left
💡 Hint
Remember that text-xl is 1.25rem and text-2xl is 1.5rem by default in Tailwind.
📝 Syntax
intermediate
2:00remaining
Fix the Tailwind class for responsive font size
Which option correctly fixes the syntax error in this Tailwind class string to apply 1rem font size on mobile and 1.25rem on large screens?

class="text-base lg:text-lg text-xl"
Aclass="text-base lg:text-lg text-xl"
Bclass="text-base lg:text-xl"
Cclass="text-base lg:text-xl text-lg"
Dclass="text-lg lg:text-xl"
Attempts:
2 left
💡 Hint
Tailwind applies classes from left to right, so avoid conflicting font sizes.
rendering
advanced
2:00remaining
What is the visual font size on a medium screen?
Given this HTML snippet with Tailwind classes:
<p class="text-sm md:text-lg lg:text-xl">Hello</p>

What font size will the text "Hello" have on a medium screen (width between 768px and 1023px)?
Tailwind
<p class="text-sm md:text-lg lg:text-xl">Hello</p>
A1.125rem (18px)
B0.875rem (14px)
C1.25rem (20px)
D1rem (16px)
Attempts:
2 left
💡 Hint
Check Tailwind's default font sizes for text-sm and text-lg.
selector
advanced
2:00remaining
Which Tailwind selector applies font size only on screens wider than 1024px?
You want to apply a font size of 1.25rem only on screens wider than 1024px. Which Tailwind class selector should you use?
Amd:text-xl
Bxl:text-xl
Clg:text-xl
Dsm:text-xl
Attempts:
2 left
💡 Hint
Check Tailwind's default breakpoints for 'lg'.
accessibility
expert
3:00remaining
Ensuring accessible responsive typography scaling
Which approach best ensures accessible and readable responsive typography scaling in Tailwind CSS?
AUse relative font sizes with responsive classes and respect user browser settings for font scaling
BUse fixed font sizes like text-base and text-lg without considering user preferences
CUse only large font sizes on all screen sizes to ensure readability
DUse custom pixel values in inline styles for precise control
Attempts:
2 left
💡 Hint
Think about users who change default font sizes or zoom settings.