0
0
Tailwindmarkup~20 mins

Breakpoint prefixes (sm, md, lg, xl, 2xl) in Tailwind - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Breakpoint Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📝 Syntax
intermediate
2:00remaining
What is the effect of this Tailwind class?
Consider the class md:text-center. What does it do?
ACenters text only on small screens
BCenters text only on screens medium size and larger
CCenters text on all screen sizes
DCenters text only on extra large screens
Attempts:
2 left
💡 Hint
Think about what the md: prefix means in Tailwind.
rendering
intermediate
2:00remaining
Which Tailwind class combination makes text red on small screens and blue on large screens?
You want text to be red on small screens and blue on large screens. Which class combination achieves this?
Atext-red-500 lg:text-blue-500
Blg:text-red-500 text-blue-500
Csm:text-red-500 xl:text-blue-500
Dtext-red-500 md:text-blue-500
Attempts:
2 left
💡 Hint
Remember that unprefixed classes apply to all sizes unless overridden.
selector
advanced
2:00remaining
Which breakpoint prefix applies styles only on screens 1536px wide or larger?
Tailwind uses these breakpoint prefixes: sm, md, lg, xl, 2xl. Which prefix applies styles starting at 1536px width?
Amd
Bxl
Clg
D2xl
Attempts:
2 left
💡 Hint
Check Tailwind's default breakpoint pixel values.
🧠 Conceptual
advanced
2:00remaining
How does Tailwind apply breakpoint prefixes in CSS?
How does Tailwind implement breakpoint prefixes like sm: or lg: in the generated CSS?
ABy wrapping styles inside media queries targeting min-width of the breakpoint
BBy adding classes that only exist on certain screen sizes
CBy using JavaScript to detect screen size and apply styles dynamically
DBy duplicating styles for every breakpoint without media queries
Attempts:
2 left
💡 Hint
Think about how CSS handles responsive design.
accessibility
expert
3:00remaining
Which breakpoint prefix usage best supports accessibility for users resizing text or zooming?
When using Tailwind breakpoint prefixes, which practice best supports accessibility for users who resize text or zoom the page?
AUse breakpoint prefixes only on font sizes, not layout
BAvoid breakpoint prefixes and rely on JavaScript for responsiveness
CUse relative units (em/rem) for breakpoints instead of fixed px values
DUse only fixed pixel breakpoints for consistent layout
Attempts:
2 left
💡 Hint
Think about how zoom and text resizing affect CSS units.