Main content
Unlisted resources area
Course: Unlisted resources area > Unit 2
Lesson 2: Webpage documentation- HTML: The h1 to h6 tags
- HTML: The p tag
- HTML: The br tag
- HTML: The ul, ol, and li tags
- HTML: The strong and em tags
- HTML: The a tag
- HTML: The image tag
- HTML: The table tags
- CSS: The element selector
- CSS: The descendant selector
- CSS: The class selector
- CSS: The id selector
- CSS: The color property
- CSS: The background-color property
- CSS: The font-family property
- CSS: The font-size property
© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice
CSS: The font-family property
The
font-family
property specifies the font family of the text, which changes how the letters look.A specific font name can be specified, like
font-family: "Arial"
, but that will only work if viewers also have "Arial" on their computer. It's better to specify a generic family name (serif
, sans-serif
, monospace
, cursive
), because then browsers will look for that sort of font on the viewer's computer.The best option is to give a comma separated list of font families, as then the browser will prefer the first but use the others as backup options.