CSS font family is used to define the font of HTML elements. This property uses many font to set the look of content. You can make your content or paragraph attractive using font family.

The syntax for CSS font family is:

For example

lets take the example of HTML font family to apply to HTMl paragraph tag contains some text. CSS font family property set the assigned font to content.

Output

This is the HTML paragraph inside the div to show the font family property. This uses font name as value of font family.

CSS text align values list

The values and description of this property is used for defining alignment of text.

Sr. No. value Description
1 font name Used to set the specified font to the content of HTML element. The value for this is can be font name.
2 initial Used to define as the property initial value.
3 inherit Used to define the computed value of property on the elements parent.
4 unset Used to define the property either acts as inherit or initial, depending on the property if it is inherited or not.

CSS font family center

This example set font of content to sans serif.

Output

This is the HTML paragraph inside the div to show the font family property. This uses font name as value of font family.