Welcome to HTML5-Tutorials

Our site offers a lot of HTML5 learning from absolutely beginning to advanced level.If you want to make a website with HTML,this site will completely guide you a lot.So learn HTML5 syntax and form of coding easily with this website.If you have any doubt,leave a message on us.We will return you so soon.This site includes innumerable number of references you need to do after studying their corresponding elements.

In this page,we will learn about HTML <font> tag.

Use of <font> tag

The <font> tag is used to define the font style in an HTML document.Font style includes font face, weight, color, face & weight.
It is not supported in HTML5.Use CSS instead to get style of the font.

Display:Inline

Example of <font> tag

    <font size="3"> This is 3-sizes texts. </font>
    <font color="green"> This is green color texts. </font>
    <font face="Arial"> This is Arial font face texts. </font>

Supported Browsers.

Tag
<font> Yes Yes Yes Yes Yes

Full Code Example

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<font color="red"> This is red color texts. </font> <br>
<font face="Arial"> This is Arial font face texts. </font> <br>
<font size="4"> This is 4-sizes texts. </font>
</body>
</html>

Output

This is red color texts.
This is Arial font face texts.
This is 4-sizes texts.

More Reference


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

Attributes of <font> tag


Attribute Value Notes
color colorname
rgb(value,value,value)
#xxxxxx
It defines the color of texts.
face font_family
It defines font face of texts.
size number
It defines the size of texts.

Note that: All the above attributes are not supported in HTML5 when they are using with font element without CSS..