basefont | NN 6 IE 4 DOM 1 | ||
A basefont element advises the browser of some font information to be used as the basis for text rendering of the current page below the basefont element. The basefont element overrides the default font settings in the browser's user preferences settings. |
|||
If you intend to alter this element by script, do so only via the properties shown here or W3C DOM-compatible document tree manipulations. Other approaches either risk the display of the document or are not permitted by the browser. |
|||
HTML Equivalent | |||
<basefont> |
|||
Object Model Reference | |||
[window.]document.getElementById("elementID")
|
|||
Object-Specific Properties | |||
|
|||
Object-Specific Methods | |||
None. |
|||
Object-Specific Event Handler Properties | |||
None. |
color | NN 6 IE 4 DOM 1 |
Read/Write | |
Sets the font color of all text below the basefont element. |
|
Example | |
document.getElementsByTagName("basefont")[0].color = "#c0c0c0"; |
|
Value | |
Case-insensitive hexadecimal triplet or plain-language color name as a string. See Appendix A for acceptable plain-language color names. |
|
Default | |
Browser default. |
face | NN 6 IE 4 DOM 1 |
Read/Write | |
Indicates a hierarchy of font faces to use for the default font of a section headed by a basefont element. The browser looks for the first font face in the comma-delimited list of font face names until it either finds a match in the client system or runs out of choices, at which point the browser default font face is used. Font face names must match the system font face names exactly. |
|
Example | |
document.getElementById("myBaseFont").face = "Bookman, Times Roman, serif"; |
|
Value | |
One or more font face names in a comma-delimited list within a string. You may use real font names or the recognized generic faces: serif | sans-serif | cursive | fantasy | monospace. |
|
Default | |
Browser default. |
size | NN 6 IE 4 DOM 1 |
Read/Write | |
Provides the size of the font in the 1-7 browser relative scale. |
|
Example | |
document.getElementById("myBaseFont").size = "+1"; |
|
Value | |
Either an integer (as a quoted string) or a quoted relative value consisting of a + or - symbol and an integer value. |
|
Default | |
3 |