From the course: CSS Essential Training

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Line-height and letter-spacing

Line-height and letter-spacing - CSS Tutorial

From the course: CSS Essential Training

Start my 1-month free trial

Line-height and letter-spacing

- [Instructor] Let's take a look at two more text-based CSS properties, line height and letter spacing. Line height sets the vertical spacing between lines of text. It can be used with different value types, including length, number, percentage, and the keyword normal. The letter spacing property sets the horizontal spacing between text characters. It can be defined with length values and the keyword normal. Let's go back to the code pin from the previous lesson. Line height is related to font size, which right now is displaying the default value of 16 pixels. I'll start by commenting out the styles from the previous exercise. Now, let's add line height to the P element. If the value is the same as the font size, there will be no space between the lines. If the value is smaller, then the lines will overlap. To add space between the lines, choose a value that is larger than the font size which will make it easier to…

Contents