Re: TAG closing! I got proof now! :)

> Look what I found on the W3C's own web server:
> 
> http://www.w3.org/pub/WWW/Graphics/PNG/Overview.html
> 
> <head><title>Portable Network Graphics</title>
> <style><!--
> body {bacground: white; color: black }
> h1, h2, h3 {font-face: helvetica, arial, sans-serif }
> --></head>
> <body bgcolor="#ffffff">
> <p><A HREF="../../"><IMG alt="W3C "
> src="../../Icons/WWW/w3c_48x48"></A>
> <A HREF="../"><IMG ALT="Graphics " 
> SRC="../../Icons/WWW/graphics_48x48"></A>
> <img alt="PNG" src="png_48">
> 
> They never closed the STYLE tag, and so MSIE does not close the head
> ... and from what I read from SGML, it is "sensible" to allow this
> code, and that a parser should be able to recover from this, and the
> HTML draft implies that such behavior should be.

End-tag minimization is allowed or disallowed by the DTD, not by SGML
itself, and in this case the file is wrong no matter which way you look
at it: 

   * the HTML 3 DTD allowed </style> to be omitted, but required the
     confusingly-named NOTATION attribute (eg notation="w3c-style"); 
but 
   * the 3.2 and Cougar DTDs do not permit minimization of </style> 
     but still require a TYPE attribute.

HTML drafts can imply what they like about _browsers_, but _parsers_
must follow the rules laid down by ISO 8879. Browsers should currently
be tolerant of broken files, as it is assumed or taken for granted that
most authors have not read the spec and don't care anyway. 

What would be useful is if browsers could have a "strict" mode, in which
they would parse correctly, but then display the file as best they can, 
and light up some kind of warning icon at the trouble spots. 

As the author of this file hasn't bothered to include a DOCTYPE
declaration, it is impossible to tell which DTD was intended, but I
suspect either (a) the author couldn't be bothered with the rules, or
(b) didn't know there was a difference, or (c) didn't bother to read
the spec (or all three). This is not uncommon. 

Either way there's a problem, because in this example, STYLE has no
content (it's all been commented out), so only a broken (ie
non-validating) browser will read it.

And in any event, whoever it was can't spell "background" right.

I suggest people ignore files like this and create their own using 
the proper tools. I don't believe at this stage it is worth notifying
W3C that such material exists on their server.

///Peter

Received on Thursday, 3 October 1996 05:02:51 UTC