0
0
CSSmarkup~5 mins

Line height in CSS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the CSS property line-height control?
The line-height property controls the vertical space between lines of text, making text easier to read by adjusting spacing.
Click to reveal answer
beginner
How do you set a line height that is 1.5 times the font size?
You can set it using line-height: 1.5;. This means the space between lines is 1.5 times the font size.
Click to reveal answer
intermediate
What is the difference between using a unitless number and a length value (like px) for line-height?
A unitless number (e.g., 1.5) multiplies the font size to set line height and scales with font size changes. A length value (e.g., 24px) sets a fixed height that does not scale with font size.
Click to reveal answer
intermediate
Why is it better to use a unitless line-height for responsive design?
Because a unitless line-height scales automatically with the font size, it keeps text spacing consistent on different screen sizes and zoom levels.
Click to reveal answer
beginner
What happens if you set line-height to a very small value like 0.5?
The lines of text will be very close together, which can make the text hard to read and look cramped.
Click to reveal answer
What does line-height: 2; mean?
AThe line height is fixed at 2 rem
BThe line height is 2 pixels
CThe line height is twice the font size
DThe line height is half the font size
Which is better for scaling text on different devices?
AUsing a unitless number for line-height
BUsing a percentage for line-height
CUsing a fixed pixel value for line-height
DNot setting line-height at all
If you want tight text lines, which line-height value would you choose?
A1.5
B0.5
C1
D3
What is the default line-height in most browsers if not set?
A1.2 to 1.4
B1
C2
D0.8
Which CSS property affects the vertical space between lines of text?
Atext-indent
Bword-spacing
Cletter-spacing
Dline-height
Explain what the CSS property line-height does and why it is important for text readability.
Think about how text looks when lines are too close or too far apart.
You got /3 concepts.
    Describe the difference between setting line-height with a unitless number versus a fixed length like pixels.
    Consider what happens when font size changes on different devices.
    You got /3 concepts.