face attribute | face property
Sets or retrieves the current typeface family.
Syntax
| HTML | <element face="p" ... > |
|---|---|
| JavaScript | |
Property values
Type: String
the typeface family.
Standards information
- Document Object Model (DOM) Level 1 Specification, Section 2.5.5
- HTML 4.01 Specification, Section 15.2.2 (Deprecated)
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
Show: