tadam logo

<basefont>

HTML <basefont> Tag

The basefont element is deprecated.

A deprecated element or attribute is one that has been outdated.
Deprecated elements may become obsolete in the future, but browsers should continue to support deprecated elements for backward compatibility.

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>
The output of the code above will be:

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.
AttributeValueDescriptionDTD
colorrgb(x,x,x)
#xxxxxx
colorname
Deprecated. Use styles instead.
Specifies the default color for text in a document
TF
facefont_familyDeprecated. Use styles instead.
Specifies the default font for text in a document
TF
sizenumberDeprecated. Use styles instead.
Specifies the default size of text in a document
TF

Standard Attributes

Тег <basefont> поддерживает следующие стандартные атрибуты:
AttributeValueDescriptionDTD
classclassnameSpecifies a classname for an elementSTF
dirrtl
ltr
Specifies the text direction for the content in an elementSTF
ididSpecifies a unique id for an elementSTF
langlanguage_codeSpecifies a language code for the content in an elementSTF
stylestyle_definitionSpecifies an inline style for an elementSTF
titletextSpecifies extra information about an elementSTF
More information about Standard Attributes.

Event Attributes

The <basefont> tag does not support any event attributes.

More information about Event Attributes.
Was this information helpful?
   

Comments