basefont element | baseFont object
[This documentation is preliminary and is subject to change.]
Sets a base font value to be used as the default font when rendering text.
![]() |
Standards information
- Document Object Model (DOM) Level 2 HTML Specification, Section 1.6.5
- HTML 4.01 Specification, Section 15.2.2 (Deprecated)
HTML information
| Closing Tag | forbidden |
|---|---|
| CSS Display |
DOM Information
Inheritance Hierarchy
Remarks
The baseFont element has been deprecated in favor of Cascading Style Sheets (CSS) rules that define specific font characteristics for content, including font, fontSize, and so on.
When the baseFont element is placed inside the BODY element, its effects depend on the presence of a closing tag. If a closing tag is specified, only the content inside the baseFont element is affected. If a closing tag is not specified, the baseFont element affects the content that follows the baseFont element in the document.
Examples
This example uses the BASEFONT element to set the base font size, and the FONT element to temporarily override it.
No BASEFONT size specified yet. <BASEFONT SIZE=4> Set the BASEFONT size. <FONT SIZE=2> Temporarily override the BASEFONT size.</FONT> Resume the BASEFONT size.
Build date: 3/8/2012
