Open In App

HTML <font> face Attribute

Improve
Improve
Like Article
Like
Save
Share
Report

The HTML <font> face Attribute is used to specify the font family of the text inside <font> element. Using the <font> tag for styling is outdated. Modern web design recommends using CSS instead of<font> tag.

Note: The <font> face attribute is not supported by HTML5.

Syntax:

<font face="font_family">

Attribute Values: 

It contains a single value font_family which is used to specify the font family. Several font family can be used by separating comma.

Example: The implementation of the font face attribute

html




<!DOCTYPE html>
<html>
 
<head>
    <title>
        HTML font face Attribute
    </title>
</head>
 
<body>
    <font size="6" face="verdana">
            GeeksforGeeks!
        </font>
    <br>
 
    <font size="6" face="arial">
            GeeksforGeeks!
        </font>
    <br>
 
    <font size="6">
            GeeksforGeeks!
        </font>
</body>
 
</html>


Output:

Example: The implementation of the font face attribute.

HTML




<!DOCTYPE html>
<html>
 
<head>
    <title>
        HTML font face and color Example
    </title>
</head>
 
<body>
    <font size="6" face="cursive" color="green">
        GeeksforGeeks!
    </font>
    <br>
 
    <font size="6" face="fantasy" color="green">
        GeeksforGeeks!
    </font>
    <br>
 
    <font size="6" color="green">
        GeeksforGeeks!
    </font>
</body>
 
</html>


Output:

Screenshot-2023-12-25-220957

Supported Browsers:

  • Google Chrome 1
  • Microsoft Edge 12
  • Firefox 1
  • Opera 12.1
  • Safari 3


Last Updated : 16 Jan, 2024
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads