Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

face attribute | face property

Sets or retrieves the current typeface family.

 

Syntax

HTML<element face="p" ... >
JavaScript

p = object.face

 

Property values

Type: String

the typeface family.

Standards information

Examples

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

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/face.htm


<font face="Arial" id=oFont>
:
<script type="text/javascript">
    alert(oFont.face + "\n" + "When you click this, the font will change");
    oFont.face = "Courier";
    alert(oFont.face + "\n" + "The font has changed.");
</script>

See also

baseFont
font
fontFamily

 

 

Show:
© 2017 Microsoft