HTML basefont color Attribute

Definition and Usage

The color attribute specifies the base (default) font color for a page.

Compatibility Notes

The basefont element was deprecated in HTML 4.01 and is not supported in XHTML 1.0 Strict DTD.
Use CSS instead.
CSS syntax (in <head>): <style>body{color:red}</style>


<basefont color="color_value" />

Syntax Example

<basefont color="red" />

Attribute Values

Value Description
color_name Specifies the color with a color name, like "red"
RGB_value Specifies the color with a RGB value, like "rgb(255,0,0)"
Hex_value Specifies the color with a hex value, like "#ff0000"

Browser Support

The attribute is deprecated, only supported by Internet Explorer, and should be avoided.


<basefont color="red" />
<p>Hello. Welcome to</p>
HTML basefont color Attribute Reviewed by 1000sourcecodes on 08:59 Rating: 5
Powered by Blogger.