Click to Rate and Give Feedback
Properties
 face Property
FACE Attribute | face Property

Sets or retrieves the current typeface family.

Syntax

HTML<ELEMENT FACE = sTypeface... >
Scripting[ sTypeface = ] object.face

Possible Values

sTypefaceString that specifies or receives the typeface family.

The property is read/write. The property has no default value.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties.

Example

This example sets the typeface family using the FACE attribute and the face property.

<FONT FACE="Arial" ID=oFont>
:
<SCRIPT>
    alert(oFont.face + "\n" + "When you click this, the font will change");
    oFont.face = 'Courier';
    alert(oFont.face + "\n" + "The font has changed.");
</SCRIPT>
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

This property is deprecated in HTML World Wide Web link and is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 World Wide Web link.

Applies To

BASEFONT, FONT

See Also

fontFamily
Tags What's this?: Add a tag
Community Content
 
Add Community Content
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker