Name

background — NN n/a IE 4 DOM n/a

Synopsis

Read/Write

The element’s style sheet background attribute. This is a shorthand attribute, so the scripted property consists of a string of space-delimited values for the backgroundAttachment, backgroundColor, backgroundImage, backgroundPosition, and backgroundRepeat property values. One or more values may be in the background value, and the individual values may be in any order.

Example

document.all.tags("DIV").style.background = "url(logo.gif) repeat-y"

Value

String of space-delimited values corresponding to one or more individual background style properties.

Default

None.

Get Dynamic HTML: The Definitive Reference 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.