W3cubDocs

/DOM

HTMLBaseFontElement

Obsolete
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

The HTMLBaseFontElement interface provides special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating <basefont> elements.

The <basefont> element has been deprecated in HTML4 and removed in HTML5. This latest specification requires that this element implements HTMLUnknownElement rather than HTMLBaseFontElement.

Properties

Inherits properties from its parent, HTMLElement.

HTMLBaseFontElement.color
Is a DOMString representing the text color using either a named color or a color specified in the hexadecimal #RRGGBB format.
HTMLBaseFontElement.face
Is a DOMString representing a list of one or more font names. The document text in the default style is rendered in the first font face that the client's browser supports. If no font listed is installed on the local system, the browser typically defaults to the proportional or fixed-width font for that system.
HTMLBaseFontElement.size
Is a DOMString representing the font size as either a numeric or relative value. Numeric values range from 1 to 7 with 1 being the smallest and 3 the default. Relative value starts with a '+' or a '-'.

Methods

No specific method; inherits methods from its parent, HTMLElement.

Specifications

Browser compatibilityUpdate compatibility data on GitHub

Desktop
Chrome Edge Firefox Internet Explorer Opera Safari
Basic support No Yes No Yes No ?
color No 17 No Yes No ?
face No 12 No Yes No ?
size No 12 No Yes No ?
Mobile
Android webview Chrome for Android Edge Mobile Firefox for Android Opera for Android iOS Safari Samsung Internet
Basic support No No Yes ? No ? No
color No No 17 ? No ? No
face No No Yes ? No ? No
size No No Yes ? No ? No

See also

  • The HTML element <basefont> was implementing this interface.

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLBaseFontElement