Syntax | HTML syntax - This element does not require a closing tag.
<basefont> XHTML syntax - This element is opened and closed, within a single tag, by adding a space followed by a forward slash at the end of the tag. <basefont /> |
---|---|
Usage | The <basefont> tag is used to specify the text font size, and optionally the color and font name. The <basefont> applies to the text that follows it. This tag is not supported by some browsers. |
Content Model | The <basefont> element cannot contain any tags. |
Required | Tag Specific | Core | Focus | Events | Language |
---|---|---|---|---|---|
size | color face | id |
Attribute | Description |
---|---|
size | The size attribute is used to specify the text font size using an integer value between 1 and 7. HTML <basefont> tag example using the size attribute. <basefont size="4" color="#FF0000" face="Courier New, Courier, monospace"> XHTML <basefont> tag example using the size attribute. <basefont size="4" color="#FF0000" face="Courier New, Courier, monospace" /> Note: This is a required attribute. Note: This attribute has been deprecated. |
color | The color attribute is used to specify the color of the text. The color value can be expressed as an sRGB value which is a hash (#) symbol followed by a hexadecimal value. Or, the color value can be expressed as a color name. Color names are black, silver, gray, white, maroon, red, purple, fuchsia, green, lime, olive, yellow, navy, blue, teal, or aqua. HTML <basefont> tag example using sRGB color value. <basefont size="4" color="#FF0000" face="Courier New, Courier, monospace"> XHTML <basefont> tag example using sRGB color value. <basefont size="4" color="#FF0000" face="Courier New, Courier, monospace" /> HTML <basefont> tag example using color name value. <basefont size="4" color="green" face="Courier New, Courier, monospace"> XHTML <basefont> tag example using color name value. <basefont size="4" color="green" face="Courier New, Courier, monospace" /> Note: This attribute has been deprecated. |
face | The face attribute is used to specify the font family by using a comma separated list of font names. HTML <basefont> tag example using the face attribute. <basefont size="4" color="#FF0000" face="Courier New, Courier, monospace"> XHTML <basefont> tag example using the face attribute. <basefont size="4" color="#FF0000" face="Courier New, Courier, monospace" /> Note: This attribute has been deprecated. |
id | The id attribute assigns a unique name to a tag. This allows style sheets or scripts to reference the tag. See id Example |
<basefont> tag example using sRGB color value. <basefont> tag example using color name value. |