HTML <basefont> faceAttribute
Examples
Specify the default font for text on the page:
<head>
<basefont face="courier, serif" />
</head>
<body>
<h1>This is a header</h1>
<p>This is a paragraph</p>
</body>
<basefont face="courier, serif" />
</head>
<body>
<h1>This is a header</h1>
<p>This is a paragraph</p>
</body>
Try it Yourself »
Browser Support
![]()
![]()
![]()
![]()
![]()
Only Internet Explorer 9 and earlier IE versions support the face attribute.
Definition and Usage
HTML5 does not support the <basefont> tag. Please use CSS instead.
The face attribute of <basefont> is deprecated in HTML 4.01.
The face attribute specifies the default font for text in the document.
Compatibility Notes
In HTML 4.01, the face attribute of the basefont element is deprecated; in XHTML 1.0 Strict DTD, the face attribute of the basefont element is not supported.
CSS syntax (<head> section): <style>body{font-family: courier, serif}</style>
CSS Example: Specify a default text font for the page
In our CSS tutorial, you can find more details aboutthe font-family property.。
Syntax
<basefont face="font_family" />
Attribute Values
| Value | Description |
|---|---|
| font_family | Specifies the font of the text. To specify a priority list of several fonts, separate the font names with commas (e.g., <basefont face="verdana,arial,sans-serif" />). |
HTML <basefont> Tag Other Extensions