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

Live Demo
<!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 the following result −

Global Attributes

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

Specific Attributes

The HTML <font> tag also supports the following additional attributes −

Attribute Value Description
color rgb(x,x,x)
#hexcode
colorname
Deprecated − Specifies the color of the text.
face List of font names Deprecated − Specifies the font families.
size number Deprecated − Specifies the font size from 1 to 7.

Event Attributes

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

Browser Support

Chrome Firefox IE Opera Safari Android
Yes Yes Yes Yes Yes Yes

html_tags_reference.htm

Advertisements