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.