From the course: CSS Essential Training

Unlock this course with a free trial

Join today to access over 25,600 courses taught by industry experts.

Line-height and letter-spacing

Line-height and letter-spacing

From the course: CSS Essential Training

Line-height and letter-spacing

- [Instructor] Let's take a look at two more text-based 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, unitless numbers, percentage, and the keyword normal. The letter spacing properties sets the horizontal spacing between text characters. It's 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 the font size, which I've set to 16 pixels. It's the default size, but I just wanted to make it clear for the demo. The default line height is also approximately 1.2. Though it may vary slightly across browsers. When the value is declared with a unitless number, it's relative to the font size. Using a value larger than font size adds space between the lines, which will make it easier to read as long as you don't add too much space. So…

Contents