To change the spacing between lines of text, which property is used?

Study for the TSA Foundations of Information Technology Exam. Prepare with flashcards and multiple choice questions, each question has hints and explanations. Get ready for your exam!

The property used to change the spacing between lines of text is known as "line-height." This CSS property controls the vertical spacing between lines of text within a block element. By adjusting the line-height, you can create a more readable text layout or accommodate certain design aesthetics.

Line-height values can be defined using unitless numbers, lengths (such as pixels or ems), or percentages. A unitless number, for instance, sets the line height proportional to the font size, making it adaptable across different font sizes. This is particularly useful in responsive designs where text scaling is necessary for different screen sizes. Proper use of line-height can greatly improve text readability, ensuring that lines of text do not appear too close together or too far apart.

Other properties related to text formatting have different purposes. Text-align focuses on the horizontal alignment of text within its container, font-size controls the size of the text itself, and margin sets the external spacing around elements but does not specifically address spacing between lines of text. Therefore, line-height is the specific property that directly impacts the spacing between lines within paragraphs or text blocks.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy