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:
© 2014 Microsoft