HTML & CSS · Junior · Question 61 of 75

Why is a unitless line-height: 1.5 usually better than line-height: 24px?

Explanation

With 24px (or 1.5em), children inherit the computed pixel value, so a large heading inside gets cramped lines. A unitless number scales with each element's font.

Further reading

Problem with a question

HTML & CSS · Junior · question 61

Test yourself

Take the HTML & CSS · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz