0
0
Tailwindmarkup~20 mins

Border width utilities in Tailwind - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Border Width Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
selector
intermediate
1:30remaining
Which Tailwind class sets a border width of 4 pixels?
Select the Tailwind CSS class that applies a 4px border width to an element.
Aborder-4
Bborder-2
Cborder-8
Dborder
Attempts:
2 left
💡 Hint
Tailwind uses numbers to represent pixel values for border widths, like 1, 2, 4, 8.
rendering
intermediate
1:30remaining
What visual border width will this element have?
<div class="border-t-0 border-r-2 border-b-4 border-l-8">Box</div>
Look at the border width classes on each side of the box. What is the width of the bottom border in pixels?
A0 pixels
B4 pixels
C2 pixels
D8 pixels
Attempts:
2 left
💡 Hint
The class border-b-4 sets the bottom border width.
🧠 Conceptual
advanced
2:00remaining
Which Tailwind class removes the border width completely on all sides?
You want no visible border on your element. Which class should you use?
Aborder-none
Bborder-transparent
Cborder-0
Dborder-hidden
Attempts:
2 left
💡 Hint
Think about how Tailwind sets border widths to zero.
accessibility
advanced
2:00remaining
Why is it important to use border width utilities carefully for accessibility?
Choose the best reason why setting very thin or no borders might affect accessibility.
AThin or missing borders can make focus outlines hard to see for keyboard users.
BBorders do not affect accessibility at all.
CThick borders always cause screen readers to crash.
DBorders control font size and can confuse users.
Attempts:
2 left
💡 Hint
Think about how users who navigate with keyboards see focus outlines.
📝 Syntax
expert
2:00remaining
What error occurs if you write this Tailwind class incorrectly?
<div class="border-4px">Box</div>
The class border-4px is used to set border width. What happens when you use this class in Tailwind CSS?
AThe border width is set to 0 pixels.
BThe border width is set to 4 pixels correctly.
CTailwind throws a build error and stops compiling.
DThe class is ignored; no border width is applied.
Attempts:
2 left
💡 Hint
Tailwind uses specific class names without units like 'px'.