THE INDIA LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML <font> Tag. Not Supported in HTML5.


Example

Specify the font size, font face and color of text:

<font size="3" color="red">This is some text!</font>
<font size="2" color="blue">This is some text!</font>
<font face="verdana" color="green">This is some text!</font>
Try it yourself »

Definition and Usage

The <font> tag is not supported in HTML5. Use CSS instead.

The <font> tag specifies the font face, font size, and color of text.


Browser Support

Element
<font> Yes Yes Yes Yes Yes

Differences Between HTML 4.01 and HTML5

The <font> tag is not supported in HTML5.


Compatibility Notes

CSS Example: Set the color of text

CSS Example: Set the font of text

CSS Example: Set the size of text

In our CSS tutorial you can find more information about CSS text color and CSS fonts.


Optional Attributes

Attribute Value Description
color rgb(x,x,x)
#xxxxxx
colorname
Not supported in HTML5.
Specifies the color of text
face font_family Not supported in HTML5.
Specifies the font of text
size number Not supported in HTML5.
Specifies the size of text