Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XHTML form validation error

Status
Not open for further replies.

luds

Programmer
Jul 15, 2003
162
0
0
GB
Hi

I've got a form on a page that's proving hard to get w3c validation in XHTML 1.0 transitional...

the form's in a table and the <tr> tags are causing hassle!

I keep getting the error, for example,

"Line 278, column 5: document type does not allow element "tr" here

<tr>

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error). "

The form itself is at
Can anyone please point me in the right direction to solve this error??

Thanks in advance

Luds



 
luds,

It sounds like you might have nested <td> tags inside each other, but hard to tell without looking at your source code.

Could you post the relevant part?



Wishdiak
 
luds,

Try looking at it in the W3C HTML validator with "show source" checked. You have some <td> tags ouside of <tr> contaners, starting on line 94. I'd start by fixing those, and you may need to contain your <form> within a <table> container as well.



Wishdiak
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top