Name

HTMLBodyElement — the <body> of an HTML document

Availability

DOM Level 1 HTML

Inherits from/Overrides

Node Element HTMLElement HTMLBodyElement

Properties

deprecated String aLink

The value of the alink attribute. Specifies the color of “active” links; that is, the color of a link when the mouse has been pressed over it but has not yet been released.

deprecated String background

The value of the background attribute. Specifies the URL of an image to use as a background texture for the document.

deprecated String bgColor

The value of the bgcolor attribute. Specifies the background color of the document.

deprecated String link

The value of the link attribute. Specifies the normal color of unvisited hyperlinks.

deprecated String text

The value of the text attribute. Specifies the foreground color (the color of text) for the document.

deprecated String vLink

The value of the vlink attribute. Specifies the normal color of “visited” hyperlinks that have already been followed.

Description

The HTMLBodyElement interface represents the <body> tag of a document. All HTML documents have a <body> tag, even if it does not explicitly appear in the document source. You can obtain the HTMLBodyElement of a document through the body property of the HTMLDocument interface.

The properties of this object specify default colors and images for the document. Although these properties represent the values of <body> attributes, the Level 0 DOM made these same values accessible through properties ...

Get JavaScript: The Definitive Guide, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.