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.
Changing fonts with font-family
From the course: CSS Essential Training
Changing fonts with font-family
- [Instructor] The font family property sets the typeface for an element. Its value is a comma separated list called a font stack with options listed in order of preference. The browser will display the first font in your list, your preferred font if it's installed on the user's device. If not, it will try the next option until one becomes available. So your lists should include similar alternatives. You can list any number of font options, but it must always end with a generic font family. Generic font families are fallback fonts defined by the browser. They help maintain a look similar to the intended style when the specific fonts are unavailable. The exact font varies across devices and operating systems. Generic font families are defined with keywords, serif, sans-serif, and monospace, which are used as fallbacks for the corresponding category of typefaces. Cursive is usually used as fallback for script or display…
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)
-
-