HTML | <basefont> color Attribute

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

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:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!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>

chevron_right


Output:

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

full-stack-img

My Personal Notes arrow_drop_up


If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.