Export (0) Print
Expand All
1 out of 7 rated this helpful - Rate this topic

background attribute | background property

Sets or retrieves the background picture tiled behind the text and graphics on the page.

Syntax

HTML<element background="p" ... >
JavaScript

p = object.background

Property values

Type: String

the URL of the file to use as the background picture for the page.

Standards information

Remarks

This property is deprecated in favor of the background-image attribute of CSS.

Windows Internet Explorer 8 or later. In IE8 Standards mode, the value of the background attribute depends on the context of the reference to the attribute. When read as a Document Object Model (DOM) attribute, background returns an absolute URL. The value specified by the page author is returned when background is read as a content attribute, when the page is displayed in an earlier document compatibility mode, or when the page is viewed with an earlier version of the browser. For more information, see Attribute Differences in Internet Explorer 8.

See also

body
Reference
backgroundImage
Conceptual
Defining Document Compatibility

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.