Forum Moderators: open

Message Too Old, No Replies

W3C Validation Error: Driving me nuts.

W3C Undefined Element error

         

Synopsis

8:30 pm on Jul 17, 2004 (gmt 0)

10+ Year Member



Hi and thanks to anyone who attempts to help me. I've just optimized my site to pass W3C's validation, but it's come down to 2 TD tags causing me grief.

Here are the errors:

Line 180, column 23: element "TD" undefined

Line 181, column 27: element "TD" undefined

There are others, but they're associated with these 2 (ie, start tag was here, end tag omitted).

Here is the code from the start of the two TD tags right down to where W3C tells me they should be closed. I can't figure out why there is something wrong, and I am no newcomber to this. I've sat here for a few hours now and it's driving me insane. I've replaced any text/links with dashes just to go along with the forum rules, so don't mind that.

<TD class="vtop2">
<TD class="right02">
<table width="100%" style="border: 0" cellpadding="5">


<tr><td class="right03"> <br /><br /><a href="--------" onclick="window.open('--------');
return false;"><img src="--------" style="border: 0" alt="--------"/></a><br /><br />--------<a href="--------" onclick="window.open('--------');
return false;">--------</a> --------<br /></td>
</tr> </table>
<td colspan="2" class="vtop">
<img src="--------" width="7" height="100%" alt="sometexttochange" /></td>
<td class="vtop">
<img src="--------" width="1" height="100%" alt="sometexttochange" /></td>

<tr>
<td colspan="7" rowspan="2"><table class="indexfifteen" style="border: 0" cellpadding="0" cellspacing="0" summary="">
<tr>
<td><div class="cent"><a href="--------" title="--------"><strong>--------</strong></a> --------<a href="--------">--------</a> --------<a href="--------">--------</a> <a href="--------">--------</a></div></td>
</tr>
</table> </td>
<td colspan="2">
<img src="--------" width="3" height="1" alt="sometexttochange" /></td>
</tr> <tr>

<td colspan="2" valign="top">
<img src="--------" width="3" height="34" alt="sometexttochange" /></td>
</tr>
<tr>
<td>
<img src="--------" width="9" height="1" alt="sometexttochange" /></td>
<td>
<img src="--------" width="175" height="1" alt="sometexttochange" /></td>
<td>
<img src="--------" width="147" height="1" alt="sometexttochange" /></td>
<td>
<img src="--------" width="258" height="1" alt="sometexttochange" /></td>
<td>
<img src="--------" width="6" height="1" alt="sometexttochange" /></td>
<td>
<img src="--------" width="177" height="1" alt="sometexttochange" /></td>
<td>
<img src="--------" width="5" height="1" alt="sometexttochange" /></td>
<td>
<img src="--------" width="2" height="1" alt="sometexttochange" /></td>
<td>
<img src="--------" width="1" height="1" alt="sometexttochange" /></td>
</tr></tr>
</table>

Again, thanks to anyone with any pointers.

Joe

encyclo

8:36 pm on Jul 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, Synopsis!

From your image tags, it looks like you're using XHTML - and in XHTML, tags are case-sensitive and in lower-case only. Replace TD with td, and you should be all set ;)

Synopsis

9:01 pm on Jul 17, 2004 (gmt 0)

10+ Year Member



Oh man. Thank you for pointing out the blistering obvious. Wow, lol. I had gone over a few hundred lines of xhtml optimizing a client's site, no wonder I couldn't see a little thing like that :( Thanks again!

Edouard_H

9:03 pm on Jul 17, 2004 (gmt 0)

10+ Year Member



<TD class="vtop2">
<TD class="right02">

Are you trying to nest a <td> within a <td>? Or are they supposed to be <td>'s in the same row? Could you post the code that immediately follows </table>? Either way you're missing at least one closing tag.

DrDoc

5:38 am on Jul 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Lots of closing tags missing...

Always close your td's, tr's and such.

Straynjer

3:03 am on Jul 22, 2004 (gmt 0)

10+ Year Member



Yup, I spotted some missed </tr> just on first eyeball.

g1smd

10:12 pm on Jul 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Messy nesting.

You can have as many <td> ... </td> <td>... </td> pairs as you like but the whole lot for one row must be INSIDE a <tr> ... </tr> pair.

You can have as many <tr> ... </tr> <tr> ... </tr> pairs as you like but the whole lot for one table must be INSIDE a <table> ... </table> pair.

Check the code again, and revalidate until all are fixed. The validator does not always report the omission of some types of closing tags, so count them by hand to make sure they are all there.