HTMLBodyElement
The HTMLBodyElement interface provides special properties (beyond those inherited from the regular HTMLElement interface) for manipulating <body> elements.
Properties
Inherits properties from its parent, HTMLElement and from WindowEventHandlers.
HTMLBodyElement.aLink-
Is a
DOMStringthat represents the color of active hyperlinks. HTMLBodyElement.background-
Is a
DOMStringthat represents the description of the location of the background image resource. Note that this is not an URI, though some older version of some browsers do expect it. HTMLBodyElement.bgColor-
Is a
DOMStringthat represents the background color for the document. HTMLBodyElement.link-
Is a
DOMStringthat represents the color of unvisited links. HTMLBodyElement.text-
Is a
DOMStringthat represents the foreground color of text. HTMLBodyElement.vLink-
Is a
DOMStringthat represents the color of visited links.
Methods
No specific methods; inherits methods from its parent, HTMLElement, and from WindowEventHandlers.
Event handlers
No specific event handlers; inherits event handlers from its parent, HTMLElement and from WindowEventHandlers.
WindowEventHandlers.onafterprint-
Is an event handler representing the code to be called when the
afterprintevent is raised. WindowEventHandlers.onbeforeprint-
Is an event handler representing the code to be called when the
beforeprintevent is raised. WindowEventHandlers.onbeforeunload-
Is an event handler representing the code to be called when the
beforeunloadevent is raised. WindowEventHandlers.onhashchange-
Is an event handler representing the code to be called when the
hashchangeevent is raised. WindowEventHandlers.onlanguagechange-
Is an event handler representing the code to be called when the
languagechangeevent is raised. WindowEventHandlers.onoffline-
Is an event handler representing the code to be called when the
offlineevent is raised. WindowEventHandlers.ononline-
Is an event handler representing the code to be called when the
onlineevent is raised. WindowEventHandlers.onpagehide-
Is an event handler representing the code to be called when the
pagehideevent is raised. WindowEventHandlers.onpageshow-
Is an event handler representing the code to be called when the
pageshowevent is raised. WindowEventHandlers.onpopstate-
Is an event handler representing the code to be called when the
popstateevent is raised. WindowEventHandlers.onrejectionhandled-
An event handler representing the code executed when the
rejectionhandledevent is raised, indicating that aPromisewas rejected and the rejection has been handled. GlobalEventHandlers.onresize-
Is an event handler representing the code to be called when the
resizeevent is raised. WindowEventHandlers.onstorage-
Is an event handler representing the code to be called when the
storageevent is raised. WindowEventHandlers.onunhandledrejection-
An event handler representing the code executed when the
unhandledrejectionevent is raised, indicating that aPromisewas rejected but the rejection was not handled. WindowEventHandlers.onunload-
Is an event handler representing the code to be called when the
unloadevent is raised.
Specifications
| Specification |
|---|
| HTML Standard # htmlbodyelement |
Browser compatibility
BCD tables only load in the browser
See also
- HTML element implementing this interface:
<body> WindowEventHandlers