0
0
Tailwindmarkup~20 mins

Line height and leading in Tailwind - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Line Height Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Tailwind's line-height utility
Which Tailwind class sets the line height to 1.5 times the font size?
Aleading-4
Bleading-6
Cleading-8
Dleading-3
Attempts:
2 left
💡 Hint
Tailwind's default font size is 1rem and leading-6 sets line height to 1.5rem, which equals 1.5 times the font size.
📝 Syntax
intermediate
2:00remaining
Correct Tailwind class for tight line height
Which Tailwind class applies a line height of 1.25 (tight leading)?
Aleading-normal
Bleading-snug
Cleading-relaxed
Dleading-tight
Attempts:
2 left
💡 Hint
The class name suggests a 'tight' line height.
rendering
advanced
3:00remaining
Visual difference of line height classes
Given the HTML below, which option shows the correct visual difference between leading-relaxed and leading-snug?
Tailwind
<p class="leading-relaxed">This text has relaxed line height.</p>
<p class="leading-snug">This text has snug line height.</p>
AThe first paragraph lines are spaced more apart than the second paragraph.
BBoth paragraphs have the same line spacing.
CThe second paragraph lines are spaced more apart than the first paragraph.
DBoth paragraphs have very tight line spacing.
Attempts:
2 left
💡 Hint
Relaxed means more space, snug means less space.
selector
advanced
2:30remaining
Choosing the right Tailwind class for accessibility
Which Tailwind line height class is best for improving readability for users with visual impairments?
Aleading-relaxed
Bleading-tight
Cleading-3
Dleading-none
Attempts:
2 left
💡 Hint
More line spacing helps readability.
🧠 Conceptual
expert
3:00remaining
Effect of custom line height with arbitrary values
What will be the computed line height if you use the Tailwind class leading-[2.2] on a paragraph with font size 1rem?
A2.2 pixels line height regardless of font size
BDefault line height of 1.5rem ignoring the custom value
C2.2 times the font size, so 2.2rem line height
DSyntax error, arbitrary values not allowed in line height
Attempts:
2 left
💡 Hint
Arbitrary values in Tailwind allow precise control.