0
0
Tailwindmarkup~20 mins

Text decoration and underline in Tailwind - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Text Decoration 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 following HTML snippet:
<p class="underline decoration-red-500">Hello World</p>

What will the text look like in the browser?
Tailwind
<p class="underline decoration-red-500">Hello World</p>
AThe text is underlined with a red line.
BThe text is underlined with a default black line.
CThe text is not underlined but colored red.
DThe text is bold and underlined.
Attempts:
2 left
💡 Hint
The 'underline' class adds an underline, and 'decoration-red-500' changes the underline color.
🧠 Conceptual
intermediate
1:30remaining
Which Tailwind class removes underline from a link?
You have a link styled with an underline by default. Which Tailwind class will remove the underline?
Tailwind
<a href="#" class="?">Click me</a>
Atext-no-underline
Bunderline-none
Cdecoration-none
Dno-underline
Attempts:
2 left
💡 Hint
Tailwind uses 'no-underline' to remove underlines.
rendering
advanced
2:00remaining
What is the visual difference between these two classes?
Look at these two Tailwind classes:
underline decoration-dotted
and
underline decoration-double

What difference will you see in the underline style?
ABoth show a solid underline with different thickness.
BThe first shows no underline, the second shows a dashed underline.
CThe first shows a dotted underline, the second shows a double line underline.
DBoth show a single solid underline but different colors.
Attempts:
2 left
💡 Hint
The 'decoration-' prefix controls the underline style.
selector
advanced
2:30remaining
Which Tailwind class combination creates a thick, wavy underline?
You want to style text with an underline that is thick and wavy. Which combination of Tailwind classes achieves this?
Aunderline decoration-double decoration-2
Bunderline decoration-wavy decoration-4
Cunderline decoration-solid decoration-8
Dunderline decoration-dotted decoration-1
Attempts:
2 left
💡 Hint
'decoration-wavy' sets the underline style, 'decoration-4' sets thickness.
accessibility
expert
3:00remaining
How to ensure underlined text is accessible for colorblind users?
You use Tailwind to underline important text with a colored underline. What is the best practice to ensure accessibility for colorblind users?
AUse underline with a color that has strong contrast and add an additional visual cue like bold or italics.
BOnly rely on underline color to convey meaning without other styles.
CRemove underline and use color alone to indicate importance.
DUse underline with a very light color to keep it subtle.
Attempts:
2 left
💡 Hint
Accessibility means not relying on color alone to convey information.