English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
This article introduces the usage of the HTML font face attribute, online examples demonstrate how to use the HTML font face attribute, browser compatibility, syntax definition, and detailed information about its attribute values, etc.
Specify the font of the text:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>HTML <font> face Attribute Usage-Basic Tutorial(oldtoolbag.com)</title>/title> </head> <body> <p><font face="verdana">This is some text!</p>/font></p> <p>HTML5The 'color' attribute is not supported. Please use CSS instead.</p> </body> </html>Test and see ‹/›
IEFirefoxOperaChromeSafari
All mainstream browsers support the 'face' attribute.
HTML5 The <font> tag is not supported. Please use CSS instead.
In HTML 4.01 In this context, the 'face' attribute of <font> has been deprecated.
The 'face' attribute of the <font> element specifies the font of the text in Chinese.
Tip:The value of the 'face' attribute can save several font names as alternatives. Place the font you wish to display most prominently at the first position in the font list. If the first font is unavailable, use the subsequent alternative fonts. You should place a generic font at the end (e.g., serif, sans-serif).-serif, monospace, cursive, or fantasy), so that when the fonts listed earlier are not available, the browser can find the font in the general font library.
In HTML 4.01 In, the face attribute of <font> is deprecated. Please use CSS instead.
CSS Syntax: <p style="font-family: verdana">
CSS Example: Set the font of the text
In our CSS tutorial, you can find more about font-family Attribute . Details.
<font face="font_family">
Value | Description |
---|---|
font_family | Specifies the font of the text. To specify a priority list of several fonts, use commas to separate the font names (for example, <font face="verdana,arial,sans-serif">). |