asp.net.ph

Skip Navigation Links

FACE Attribute | face Property

Language References


Sets or retrieves the current font's family.

Syntax


Inline <element FACE = sTypeface...>
Script object.face = sTypeface ]

Possible Values


sTypeface String specifying the font family.

The property is read/write with no default value.

Remarks

This attribute defines a comma-separated list of font names the user agent should search for in order of preference. Browsers use the first font in the list if it is available, otherwise it uses the second font if it is available, and so on. If none of the specified fonts are available, no font face change occurs.

Each entry in the font list can be a specific font name, for example "helvetica", or it can be a generic font name, such as "serif", "sans-serif", "cursive", "monospace", and "fantasy".

This attribute has been deprecated in favor of the CSS font-family property.

Example

The following example demonstrates setting the font-family using the face attribute.

<font face="arial" id=oFont>
...
<script language="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>

This feature requires Microsoft® Internet Explorer® 4.0 or later.

 Show me 

Applies To

BASEFONT, FONT



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note