HTML <basefont> Tag
The basefont element is deprecated.
Example
Specify a default font-color and font-size for text on page:
<head>
<basefont color="red" size="5" />
</head>
<body>
<h1>This is a header</h1>
<p>This is a paragraph</p>
</body> |
Try it yourself » |
Definition and Usage
The <basefont> tag specifies a default font-color, font-size, or font-family for all the text in a document.
Browser Support

The <basefont> tag is only supported by Internet Explorer, and should be avoided!
Differences Between HTML and XHTML
NONE
Tips and Notes
Tip: Use CSS to specify a default font-color, font-size, and font-family for all the text in a document.
Optional Attributes
DTD indicates in which HTML 4.01/XHTML 1.0
DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.
| Attribute |
Value |
Description |
DTD |
| color |
rgb(x,x,x)
#xxxxxx
colorname |
Deprecated. Use styles instead. Specifies the
default color for text in a document |
TF |
| face |
font_family |
Deprecated. Use styles instead. Specifies the
default font for text in a document |
TF |
| size |
number |
Deprecated. Use styles instead.
Specifies the default size of text in a document |
TF |
Standard Attributes
The <basefont> tag supports the following standard attributes:
| Attribute |
Value |
Description |
DTD |
| class |
classname |
Specifies a classname for an element |
TF |
| dir |
rtl
ltr |
Specifies the text direction
for the content in an element |
TF |
| id |
id |
Specifies a unique id for an element |
TF |
| lang |
language_code |
Specifies a language code for the content in an element |
TF |
| style |
style_definition |
Specifies an inline style for an element |
TF |
| title |
text |
Specifies extra information about an element |
TF |
More information about Standard Attributes.
Event Attributes
The <basefont> tag does not support any event attributes.
More information about Event Attributes.
Click here to design a Stunning Flash Website for Free
Wix is a revolutionary web design tool that provides anyone with the possibility to create professional and beautiful websites for free.
With e-commerce features, search engine visibility and many more professional tools, Wix is the ultimate solution for creating a spectacular site while saving tons of money.
 |
W3Schools' Online Certification Program
The perfect solution for professionals who need to balance work, family, and career building.
More than 4000 certificates already issued!
|
The HTML Certificate documents your knowledge of HTML, XHTML, and CSS.
The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.
The PHP Certificate documents your knowledge of PHP and SQL (MySQL).
|