HTML and CSS Certification Practice Test

Question: 1 / 400

Which CSS property adjusts the space between lines of text?

line-height

The property that adjusts the space between lines of text in CSS is the line-height property. This property allows you to specify a specific height for each line of text, which consequently controls the vertical space between lines. By setting the value of line-height, you can enhance the readability of text or create a specific visual style.

For example, a line-height value greater than 1 (like 1.5 or 2) will increase the space between lines, while a value less than 1 will decrease that space, potentially making the text denser and harder to read if overused. Setting line-height can also be done using units like pixels, ems, or percentages, giving designers flexibility in how they wish to format text.

Other properties mentioned, like padding and margin, control spacing, but they do so in different contexts. Padding adds space inside an element's border, affecting the area around the content within that element, while margin creates space outside an element’s border, impacting the distance between that element and others surrounding it. The term spacing is not a defined CSS property, which makes it inapplicable in this context. Therefore, line-height is the correct answer to achieve the desired effect of adjusting the space between lines of text.

Get further explanation with Examzify DeepDiveBeta

padding

margin

spacing

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy