BACKGROUND attribute on elements other than the BODY (not W3C)

The BACKGROUND attribute was only valid on the BODY tag (loose DTD), but for other tags it was IE only and never made the specification. Does it work in other browsers?
Date Created: 5th November 2006
Date Modified: 5th November 2006
Home > HTML > BACKGROUND Attribute

Inspired by WebmasterWorld HTML Forum:
http://www.webmasterworld.com/html/3146306.htm

Cell (0,0) - Just some text
in the first cell
Cell (1,0) - The second cell...
Cell (0,1) - More text...Cell (1,1) - The final cell with a BACKGROUND
attribute specifying an image to have
as the background.

Well, this does seem to work cross-browser (IE6, FF, Opera8), but it is not valid HTML.

It seems the BACKGROUND attribute was only ever valid for the <BODY> tag. Although this is now deprecated (still valid under an HTML 4.01 loose DOCTYPE).

I think the BACKGROUND attribute on other elements, such as the <td> tag, was initially IE only. Although it was later adopted by other browsers, it never made the W3C specification.

Use CSS instead.

[Home]