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
The basefont element was deprecated in HTML 4.01, and is not supported in XHTML 1.0 Strict DTD.
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 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 <baefont> tag supports the following standard attributes:
| Attribute |
Value |
Description |
DTD |
| class |
classname |
Specifies a classname for an element |
STF |
| dir |
rtl
ltr |
Specifies the text direction
for the content in an element |
STF |
| id |
id |
Specifies a unique id for an element |
STF |
| lang |
language_code |
Specifies a language code for the content in an element |
STF |
| style |
style_definition |
Specifies an inline style for an element |
STF |
| title |
text |
Specifies extra information about an element |
STF |
More information about Standard Attributes.
Event Attributes
The <basefont> tag does not support any event attributes.
More information about Event Attributes.

Need an easy way to get data into XML, or transform XML to another format?
MapForce lets you map XML data to/from any combination of XML, database, flat file, Excel 2007, XBRL, or Web services data.
Then it transforms data instantly or auto-generates royalty-free data integration code for recurrent conversions.
Download a free, fully functional 30-day trial to experience the following features:
- Easy-to-use, graphical data mapping interface
- Instant data transformation
- XSLT 1.0/2.0 and XQuery code generation
- Java, C#, and C++ code generation
- Advanced data processing functions
- Support for all major relational databases including SQL Server, IBM DB2, Oracle, and more
- Visual Studio & Eclipse integration
Download a fully-functional trial today!
|
|
|
|