?
Solved

Tag information for the Table <TD> Tag

Posted on 2003-03-21
5
Medium Priority
?
119 Views
Last Modified: 2013-11-19
During a major redesign of a client's site, I decided to go one step further and run all the pages through the w3.org SHTML validation parser. I got ALL issues cleaned up except one!

Below is what they're telling me. I can't find any documentation about the background attrib. I'd love this page to validate. Any ideas?


Below are the results of attempting to parse this document with an SGML parser.

Line 22, column 55: there is no attribute "BACKGROUND" (explain...).
    <TD align="left" valign="top" width="150" background="images/mainpage_16.gif">

0
Comment
Question by:digitalwav
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 

Expert Comment

by:rajini_chaya
ID: 8183999
Hi,
Yes there is no background attribute for the tag <td>
you can use this attribute only for the <table> tag.
Refer http://www.w3schools.com/html/attr_td.asp

0
 
LVL 1

Author Comment

by:digitalwav
ID: 8184007
hmmm, then why can I put the tag on a cell in a table and the image works just for that cell? Is it a browser thing?
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 8184091
Background for the td is supported by the major browsers, but it is not part of the standard.  The validators validate to the standard, so background will always generate an error.  

The standards compliant way t do it is:

<TD align="left" valign="top" width="150" style="background-image:url(images/mainpage_16.gif)">

Cd&
0
 
LVL 1

Author Comment

by:digitalwav
ID: 8184127
Successfull validation is a wonderful thing!

I gave the points to COBOLdinasaur because he provided a work around that validated successfully.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 8184270
Glad we could help.  Thanks for the A.:^)

Cd&
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

770 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