font-family

The font-family property is a prioritized list of font family names and/or generic family names.

Syntax

font-family: [[ <family-name> | <generic-family> ] [, <family-name>| <generic-family>]* ] | inherit
Initial: depends on user agent
Applies To: all elements
Inherited: yes
Percentages: NA
Media: visual

Values

font-family: value
Value Description
family-name Name of a font family of choice
generic-family Name of a generic font family as an alternative

DOM

[window.]document.getElementById("element-id").style.fontFamily = "font-family";

Example | family-name

Example | generic-family

Example | DOM

External

W3C Cascading Style Sheets, level 1

W3C Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification