W3C home > Mailing lists > Public > www-validator@w3.org > February 2002

Re: Head section 'not open'

From: Masayasu Ishikawa <mimasa@w3.org>
Date: Wed, 27 Feb 2002 20:49:38 +0900 (JST)
Message-Id: <20020227.204938.74747864.mimasa@w3.org>
To: Paul.Wicks@ilt.ac.uk
Cc: www-validator@w3.org
Paul Wicks <Paul.Wicks@ilt.ac.uk> wrote:

> If I use an xml style empty element in the head section of a document, i.e.
> <link ... /> or <meta ... /> the validator appears to interpret this as the
> end of the head section in an HTML 4.01 transitional document. Is this a bug
> in the validator,

No.  The SGML declaration of HTML 4.01 says "SHORTTAG YES", which allows
shorthand markup like null end-tag (NET).  However, the NET delimiter is
"/", so "<link ... />" is an equivalent of "<link ... >>" and the last
">" is just treated as character data.  Since the content model of
the head element doesn't allow character data as a direct child,
the validator interprets this as the end of the head element and
treats that there are implied "</head>" and "<body>" between "/" and ">".

> or can I not have a document that is both compatible with
> xhtml and html4.01?


Masayasu Ishikawa / mimasa@w3.org
W3C - World Wide Web Consortium
Received on Wednesday, 27 February 2002 06:50:04 UTC

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