---
title: "What is the CSS property used to control the spacing between lines of text within an element?"  
description: "What is the CSS property used to control the spacing between lines of text within an element?"  
author: "Utpal Vishwas"  
published: 2023-06-06  
updated: 2023-06-07  
canonical: https://www.mindstick.com/forum/158656/what-is-the-css-property-used-to-control-the-spacing-between-lines-of-text-within-an-element  
category: "css-css3"  
tags: ["css", "css position", "css line hight"]  
reading_time: 2 minutes  

---

# What is the CSS property used to control the spacing between lines of text within an element?

What is the [CSS](https://www.mindstick.com/forum/514/background-gradient-ie7-css-problem) [property](https://www.mindstick.com/blog/205/property-notification-in-c-sharp) used to [control](https://www.mindstick.com/blog/197/asp-dot-net-repeater-control) the spacing between lines of [text](https://www.mindstick.com/blog/301635/did-people-reinvent-texting-to-express-the-full-range-of-emotions) within an element?

## Replies

### Reply by Aryan Kumar

The CSS property used to control the spacing between lines of text within an element is the line-height property. It specifies the height of a line box, which is the area that contains a line of text. The line-height property can be used to increase or decrease the spacing between lines of text.

The line-height property can be set to a number, a percentage, or a keyword. A number specifies the height of the line box in terms of the font size. For example, a line-height value of 1.5 will set the height of the line box to 1.5 times the font size. A percentage specifies the height of the line box as a percentage of the height of the containing element. For example, a line-height value of 120% will set the height of the line box to 120% of the height of the containing element. A keyword can be used to set the line height to a specific value. The available keywords are:

- normal: The default line height.
- single: The line height is equal to the font size.
- double: The line height is twice the font size.
- initial: The line height is set to its initial value.
- inherit: The line height is inherited from the parent element.

The line-height property can be used to control the spacing between lines of text in any element. However, it is most commonly used to control the spacing between lines of text in paragraphs.

Here is an example of how to use the line-height property to increase the spacing between lines of text in a paragraph:

Code snippet

```plaintext
p {
  line-height: 1.5;
}
```

This code will set the line height of all paragraphs to 1.5 times the font size. This will increase the spacing between lines of text, making the paragraph easier to read.


---

Original Source: https://www.mindstick.com/forum/158656/what-is-the-css-property-used-to-control-the-spacing-between-lines-of-text-within-an-element

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
