HTML <font> Tag

Advertisements


Description

The HTML <font> tag is used to specify the font of the text. It is deprecated in HTML as well as in XHTML.

Example

<!DOCTYPE html>
<html>
<head>
<title>HTML font Tag</title>
</head>
<body>
<font face="cursive,serif" color="#ff9900" size="4">
The HTML font tag is now deprecated. You should use start using CSS to set font size and family.
</font>
</body>
</html>

This will produce following result:

The HTML font tag is now deprecated. You should use start using CSS to set font size and family.

Global Attributes

This tag supports all the global attributes described in - HTML Attribute Reference

Specific Attributes

The HTML <font> tag also supports following additional attributes:

AttributeValueDescription
color rgb(x,x,x)
#hexcode
colorname
Deprecated - Specifies the color of the text.
face List of font namesDeprecated - Specifies the font families.
size numberDeprecated - Specifies the font size from 1 to 7.

Event Attributes

This tag supports all the event attributes described in - HTML Events Reference

Browser Support

ChromeFirefoxIEOperaSafariAndroid
YesYesYesYesYesYes

html_tags_reference.htm

Advertisements