Sets a combination of separate font properties of the object. Alternatively, sets one or more of six user-preference fonts.


{ font: sFont }

Possible values


String that specifies up to six of the following space-delimited property values, or, alternatively, sets the six listed text fonts:


Any of the range of font-style values available to the font-style property.


Any of the range of font-variant values available to the font-variant property.


Any of the range of font-weight values available to the font-weight property.


Any of the range of font-size values available to the font-size property. When this value is an integer followed by a percent sign (%), the value is a percentage of the font size of the parent object.


Any of the range of line-height values available to the line-height property. Line height percentage values are calculated as a percentage of the font size of the element itself, not of the parent.


Any of the range of font-family values available to the font-family property. This property can be set to multiple comma-separated values. Its default value depends on user settings.

This property has a default value of normal normal normal medium normal "Times New Roman". It is inherited.


This is a composite property that specifies up to six font values. The font-style, font-variant, and font-weight values may appear in any order before font-size. However, the font-size, line-height, and font-family properties must appear in the order listed. Setting the font property also sets the component properties. In this case, the string must be a combination of valid values for the component properties; only the font-family value may have more than one value. If the string does not contain a value for a component property, that property is set to its default, regardless of prior settings for that component property.


The following example uses the font property to change font characteristics. This example uses an inline style sheet to set the font attributes:

<span style="font:italic normal bolder 12pt Arial"> 

Standards information

This property is defined in Cascading Style Sheets (CSS), Level 1 (CSS1) Ee371240.xtlink_newWindow(en-us,Expression.40).png.

Applies to

a, address, b, big, blockquote, body, button, caption, center, cite, code, col, colgroup, custom, dd, defaults, dfn, div, dl, dt, em, fieldset, form, hn, html, i, img, input type=button, input type=checkbox, input type=file, input type=image, input type=password, input type=radio, input type=reset, input type=submit, input type=text, li, ol, p, s, select, span, sub, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, var, xmp

See also

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.

Community Additions