font-familyfont-family*
*



Contents  *



Index  *Topic Contents
*Previous Topic: @font-face
*Next Topic: font-size

font-family

Description

Specifies the typeface name of the font used for text in the element.

Syntax

{ font-family: [[ family-name | generic-family ] , ]* [ family-name | generic-family ]}

Remarks

The value associated with this attribute is a prioritized list of font family names and/or generic family names. List items are separated by commas to minimize confusion between multiple-word font family names. If the font family name contains white space, it is recommended that it is quoted with single or double quotation marks.

This attribute is inherited.

Example

The following generic families are defined, with an example name in parentheses.

'serif' (Times) 
'sans-serif' (Helvetica) 
'cursive' (Zapf-Chancery) 
'fantasy' (Western) 
'monospace' (Courier) 

Not knowing which fonts users will have installed on their computers, authors should provide a list of alternatives with a generic font-family at the end of the list. This list can include embedded fonts. See @font-face for more information on embedding fonts.

BODY { font-family: univers, helvetica, sans-serif }
BODY { font-family: 'new century schoolbook', serif }

Applies To

A, ADDRESS, APPLET, B, BIG, BLOCKQUOTE, BODY, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, DD, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FORM, H1, H2, H3, < A HREF="../objects/H4.htm#H4">H4, H5, H6, HTML, I, INPUT, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OL, P, PLAINTEXT, PRE, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP, INPUT type=button, INPUT type=file, INPUT type=reset, INPUT type=submit, INPUT type=text

Scripting Property

fontFamily


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.