Re: [VE][79] Error Message Feedback

Hemmo de Vries wrote:
> 
> Validating http://hemmo.ahrn.nl/indeks.php Error [79]: "end tag for 
> element X which is not open"
> 
> Currently, the Validator errors when line contents are too long, but 
> in this case it is required for the (java)script i am using. Is this 
> invalid html or is it a bug in the validator?

It's invalid HTML and it has nothing to do with line length.
http://www.htmlhelp.com/tools/validator/problems.html#script

It's one of the many problems with using document.write(), you have to 
be careful about writing end tags.

Also note that the markup you're writing out with document.write() is 
actually invalid HTML.  These are just some of the other problems I noticed:

* <nobr> is undefined (even though its supported by some browsers)
* <a href="..." target="_new"> should be "_blank" (though, forcing new 
windows is a bad idea)

* You're also using XML syntax in an HTML 4 document.  i.e. Use <br>, 
not <br/> or <br />.  The same applies to <meta>, <link>, <hr> and other 
empty elements.

-- 
Lachlan Hunt
http://lachy.id.au/

Received on Monday, 1 May 2006 05:08:54 UTC