0
0
Tailwindmarkup~20 mins

Border color and style in Tailwind - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Border Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
selector
intermediate
2:00remaining
Which Tailwind class sets a solid red border?
You want a solid border with a red color around a box. Which Tailwind CSS class will do this?
Aborder-red-500 border-dashed
Bborder-red-500 border-solid
Cborder-red-500 border-double
Dborder-red-500 border-none
Attempts:
2 left
💡 Hint
Think about the style keyword that means a continuous line.
rendering
intermediate
2:00remaining
What border style will this Tailwind code produce?
Look at this Tailwind CSS code:
<div class="border-4 border-blue-700 border-dotted">Box</div>

What will the border look like?
AA thick blue border with dotted lines
BA thin blue border with solid lines
CA thick blue border with dashed lines
DNo border visible
Attempts:
2 left
💡 Hint
Check the meaning of border-4 and border-dotted.
🧠 Conceptual
advanced
2:00remaining
How does Tailwind apply border color when multiple border color classes are used?
If you write this HTML:
<div class="border border-red-500 border-green-400">Test</div>

What color will the border be and why?
ANo border color is applied due to conflict
BRed, because the first border color class takes priority
CBoth red and green borders appear side by side
DGreen, because the last border color class overrides the previous
Attempts:
2 left
💡 Hint
Think about how CSS applies multiple classes with conflicting properties.
layout
advanced
2:00remaining
Which Tailwind classes create a dashed border only on the top side with a custom color?
You want a dashed border only on the top side of a box, colored purple. Which set of classes achieves this?
Aborder-t-2 border-dotted border-purple-600
Bborder-2 border-dashed border-t-purple-600
Cborder-t-2 border-dashed border-purple-600
Dborder-t-2 border-solid border-purple-600
Attempts:
2 left
💡 Hint
Remember how Tailwind names border width and color for specific sides.
accessibility
expert
2:00remaining
Why is it important to consider border color contrast in Tailwind designs?
You set a border color using Tailwind classes on a button. Why must you ensure good contrast between border color and background?
ATo make sure users with vision impairments can see the border clearly
BBecause border colors do not affect accessibility
CTo reduce the file size of CSS generated by Tailwind
DBecause border colors only matter for printing, not screens
Attempts:
2 left
💡 Hint
Think about users who have difficulty seeing colors or low contrast.