Basefont HTML Element
Set Default Font with Base Element in HTML
Basefont HTML Element
With the help of <basefont> element you can set the default font of your webpage. Base font is applied on the whole document. <basefont> tag is not supported in HTML5 and in some browser. <basefont> element use following attributes:
| Attribute Name | Function |
| Color | set the Font color. |
| Face | Set the Font Face. |
| Size | Specify the Font size |
Syntax:
<basefont Attribute1="Value" Attribute2="Value"...... />
Example
The <basefont> element is set inside the head of this document:
<head>
<basefont size="4"/>
</head>
<Basefont> attribute
Color: The color attribute changes the color of the text that follows the basefont element.
<basefont size="2" color="purple">
This attribute takes as its value a recognized color name such as "blue" or "red" or a value specified in hexadecimal format for example, "#003366".
Face (HTML attribute):
The face attribute allows the author to define fonts to be displayed .
Example
<basefont size="2" face="Courier New, Courier, monospace">
Size (HTML attribute):
The size attribute for basefont is supposed to affect the base size of text for the document.
Example
<basefont size="7"/>