• In CSS there are five generic font families: Serif fonts have a small stroke at the edges of each letter. They create a sense of formality and elegance.
  • The font-family property is the cornerstone of CSS font families. It allows you to specify a list of font names, giving browsers a list of options to choose from.
  • The font-family property can hold several font names as a "fallback" system. If the browser does not support the first font, it tries the next font.
  • It is quite common to see more than one font family listed in CSS where one ends with a generic font family.
  • The font-family CSS property specifies a prioritized list of one or more font family names and/or generic family names for the selected element.
  • h1 { font-family: Roboto, Geneva, Arial, Helvetica, sans-serif;}p { font-family: "Roboto Slab", Georgia, "Times New Roman", Times, serif;}.generic h2...
  • CSS font-family defines the priority for the browser to choose the font from multiple fonts. There are 2 types of font families which you can use –.
  • CSS font-family property is used to set the font face of the text on the webpage. In this tutorial, you will learn about the CSS font family with the help of examples.
  • The CSS font-family property is used to define the font family for the text, to make the text looks/appears more interactive.
  • Since not all fonts are available on all computers (there are thousands of fonts, and most are not free), CSS provides a system of fallbacks.