W3C home > Mailing lists > Public > www-validator@w3.org > May 2006

Re: [VE][79] Error Message Feedback

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Mon, 01 May 2006 15:10:42 +1000
Message-ID: <44559852.1050505@lachy.id.au>
To: Hemmo de Vries <hemmo@hfa-soft.com>
CC: www-validator@w3.org

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.

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
Received on Monday, 1 May 2006 05:08:54 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:48 UTC