English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The face attribute specifies the default font for the text in the document.
Specify the default font on the page font:
<!DOCTYPE html> <html> <head> <title>HTML: <basefont> face attribute - Basic Tutorial Website oldtoolbag.com</title> <basefont face="courier, serif"> </head> <body> <h1>This is a heading</h1" <p>This is a paragraph.</p>/p> </html>Test and see ‹/›
IEFirefoxOperaChromeSafari
Only Internet Explorer 9 及更早IE版本支持 face 属性。
Definition and Usage5 HTML Is not supported. Please use
The face attribute of <basefont> in HTML 4in HTML1Is deprecated.
CSS alternative.
Compatibility comment 4in HTML1 .0 1It is not recommended to use the face attribute of the basefont element; in XHTML
.0 Strict DTD does not support the face attribute of the basefont element.-CSS syntax (<head> section): <style>body{font/family: courier, serif</
Syntaxfont_family<basefont face=" /"
Value | Description |
---|---|
font_family | Specifies the font for the text. To specify a preference list of several fonts, separate the font names with commas (for example, <basefont face="verdana,arial,sans-serif /) |