Open In App

HTML | <basefont> color Attribute

Last Updated : 13 Jan, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

The HTML <basefont> color Attribute is used to set the default font color in a document.

Note: This attribute is not supported by HTML5.

Syntax:

<basefont color="color_name|hex_number|rgb_number"> 

Attribute Values:

  • color_name It is used to specify the name of the font color.
  • hex_number: It is used to specify the font color in terms of hex code.
  • rgb_number It is used to specify the font color in terms of rgb value.

Example:




<!DOCTYPE html> 
<html
  
<head
    <title>
        HTML basefont color Attribute
    </title
  
    <basefont color="green" size="9"
</head
  
<body style="text-align:center;"
      
    <h1>GeeksforGeeks</h1
      
    <h2>HTML <basefont> color Attribute</h2
      
    <p>A computer science portal for geeks</p
</body
  
</html>


Output:

Supported Browsers: The <basefont> color attribute is not supported by any browsers.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads