Forum Moderators: open

Message Too Old, No Replies

closing tag for element </td>

closing tags for element </td>

         

amythepoet

1:29 pm on Jan 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



HI,

I am having trouble with the following:

<td id="rightframe"> <p align="center"><a href="order.html"><img src="imagery/order-now.gif" alt="Click Here To Order One Of blue or green widgets" width="200" height="50" border="0" /></a></p>
<p>&nbsp;</p>

I get error message saying document type does not permit element <td> in content of element <td> and then it says close tag for element </td> omitted but document type doesn't permit it

Span

1:37 pm on Jan 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You would have to check, but it could be that <td id="rightframe"> starts in another <td> that has no </td> closing tag.

kaled

2:41 pm on Jan 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<tr> may contain multiple <td> but nothing else.
Though browsers may consider a <td> to be closed by the next <td> <tr>, </tr> or </table>, validation requires each <td> to be explicitly closed using </td>

In your example, it appears that you have closed <td> using </p> - hence the error.

Kaled.

amythepoet

4:03 pm on Jan 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Oh, ok, I will try and work it out.

Thank you

amythepoet

4:17 pm on Jan 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Still stuck...

inveni0

5:10 am on Jan 22, 2006 (gmt 0)

10+ Year Member



Add </td> before <td id="rightframe">

tbear

8:53 am on Jan 22, 2006 (gmt 0)

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



In the code you pasted at the start of this thread you have no closing </td>.
Perhaps you have others missing too, but the snippet, as is, should have a closing tag
i.e.

<td id="rightframe">
<p align="center">
<a href="order.html">
<img src="imagery/order-now.gif" alt="Click Here To Order One Of blue or green widgets" width="200" height="50" border="0" />
</a>
</p>
<p>
&nbsp;
</p>
</td>

I find indenting my code helps when I am looking for errors such as this. Something I learned from a (now retired) coder of the old school some 10 years ago. ;)

amythepoet

12:22 pm on Jan 22, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks everybody, I have fixed it!

I'm learning so much here, you're a weath of information!

tbear

1:01 pm on Jan 22, 2006 (gmt 0)

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



Could you tell us what the problem was, for future reference?

amythepoet

3:07 pm on Jan 22, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Oh, well the problem was my page wasn't validating and I kept going over the lines trying to make sure my tags were closed properly and they weren't.

I'm learning. as we go.

rocknbil

8:09 pm on Jan 22, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Amy I recommend a good editor like Macromedia Homesite, which has validators right in the program. (Select Tools->Validate Current Document.) This will eliminate 95% of your validation errors before you go through the upload and validate process online.

mcvos

9:30 pm on Jan 22, 2006 (gmt 0)

10+ Year Member



If you're writing xhtml instead of html, using an xml editor can save you lots of headaches. It will indent your code for you and warn you when you forgot a closing tag. I'm sure there are good editors for html too, but I don't know as much about those.

mcv.