CSS

CSS Intro

CSS Intro Quiz

CSS Intro Exercise

CSS Basic

CSS Basic Quiz

CSS Basic Exercise

CSS Advance

CSS Advance Quiz

CSS Advance Exercise

CSS3

CSS3 Quiz

CSS3 Exercise

CSS Properties

CSS Functions

CSS Selectors

CSS font family Property

CSS font-family Property

 

 

The font-family property is used to specify the font for an element. It can hold several font names as a fallback system. If the browser does not support the first font, it tries the next font.

 

Types of Fonts:-

 

family-name:- The name of a font family like a courier, Arial, etc.
generic-family:- The name of a generic family like a serif, sans-serif, fantasy, etc.

 

For Your Information:-

 

For best writing, a font family starts with a family name and ends with a generic name and separates each of them with a comma.

 

Syntax:-

 

Its syntax is:- font-family: family-name | generic-family | initial | inherit;

 

Further Explanation:-

 

Value Description
family-name / generic-family A prioritized list of font family names OR generic family names OR both.
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

Code Explanation

All Tutorials related to CSS Properties

All Sections related to CSS