Equivalent of <td background="...">

Posted on 2005-05-05
Last Modified: 2013-11-19
Hi all,

I have a site which I am trying to at least get to 4.01 HTML Transitional compliance.  I have everything I need done except for one thing... Running it through's validator & I keep getting the following:

"Line 26, column 29: there is no attribute "BACKGROUND"

<td colspan="5" background="/Images/topline.jpg">

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute."

It's the only thing I've got left to figure out - what's the equivalent in HTML 4.01 Transitional?
Question by:Barthax
    LVL 32

    Accepted Solution

    You can use CSS to set the background image


    <td colspan="5" style="background-image:url('/Images/topline.jpg')">
    LVL 19

    Author Comment

    Bah, humbug! I had tried that through a style sheet but got no effect from it.  I guess I must have got something incorrect.

    Thanks for confirming, none-the-less. :D

    Featured Post

    Javascript: Crash Course

    Javascript is not only emerging as the most important language to know, it's flexibility is unique. With Javascript being deployed on the web, mobile and even the desktop this is the one language that all technologists need to know.

    Join & Write a Comment

    Preface In the first article: A Better Website Login System ( I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
    I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
    In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
    The viewer will learn how to dynamically set the form action using jQuery.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now