0
0
Tailwindmarkup~20 mins

Width utilities in Tailwind - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Width Utilities Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Tailwind Width Classes
Which Tailwind CSS class sets an element's width to exactly 50% of its parent container?
Aw-1/2
Bw-50
Cw-1/4
Dw-full
Attempts:
2 left
💡 Hint
Tailwind uses fractions like 1/2 to represent percentages of width.
📝 Syntax
intermediate
2:00remaining
Identify the Correct Tailwind Width Class Syntax
Which option correctly applies a fixed width of 16rem using Tailwind CSS?
Aw-16
Bw-1/16
Cw-[16rem]
Dwidth-16rem
Attempts:
2 left
💡 Hint
Tailwind uses square brackets for arbitrary values.
rendering
advanced
2:00remaining
Predict the Visual Width Result
Given this HTML snippet with Tailwind classes:
<div class="w-1/3 bg-blue-500 h-16">Box</div>

What fraction of the parent container's width will the blue box occupy?
AOne third (33.33%)
BOne half (50%)
CFull width (100%)
DOne quarter (25%)
Attempts:
2 left
💡 Hint
The class w-1/3 means one third width.
selector
advanced
2:00remaining
Choosing the Correct Width Utility for Responsive Design
You want a div to be full width on small screens but only 25% width on large screens using Tailwind CSS. Which class combination achieves this?
Aw-1/4 sm:w-full
Bw-full lg:w-1/4
Cw-full md:w-1/2
Dw-1/4 lg:w-full
Attempts:
2 left
💡 Hint
Tailwind uses prefixes like lg: to apply styles at larger screen sizes.
accessibility
expert
3:00remaining
Accessibility Impact of Width Utilities
Which statement best explains how improper use of Tailwind width utilities can affect accessibility?
AApplying width classes disables keyboard navigation on the element.
BUsing width utilities only affects visual style and has no impact on accessibility.
CWidth utilities automatically adjust for all users, so no accessibility concerns exist.
DSetting fixed widths without considering viewport can cause content to be cut off or require horizontal scrolling, making it harder for keyboard and screen reader users.
Attempts:
2 left
💡 Hint
Think about how fixed widths behave on small screens and assistive technologies.