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
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
(Locked)
Typography for the web3m 32s
-
(Locked)
Changing fonts with font-family2m 18s
-
(Locked)
Working with font-weight and font-style1m 48s
-
(Locked)
Web fonts with @font-face1m 56s
-
(Locked)
Online font services3m 54s
-
(Locked)
Project: Add custom fonts4m 38s
-
(Locked)
The font-size property3m 19s
-
(Locked)
Font size and accessibility4m 32s
-
(Locked)
Text-align, text-transform, and text-decoration3m 28s
-
(Locked)
Line-height and letter-spacing2m 49s
-
(Locked)
Project: Font and text styles8m 28s
-
(Locked)
Project: Button styles7m 3s
-
(Locked)
Project: Borders, spacing, and color11m 38s
-
(Locked)
-
-