Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Body background attribute

Body background attribute

Body Object Reference Body object


Definition and Usage

The background attribute sets or returns the value of the background attribute of the body element.

The background attribute describes the background image of the document.

Syntax

bodyObject.background=

URL


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the background attribute.


Example

Example

Return the value of the background attribute of the body element:

Runoob Tutorial(runoob.com)

Try it »


Body Object Reference Body object