W3C home > Mailing lists > Public > www-validator@w3.org > November 2011

Re: [VE][247] Add Subject Here

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Wed, 16 Nov 2011 21:59:40 +0200
Message-ID: <4EC4162C.3000205@cs.tut.fi>
To: "www-validator@w3.org" <www-validator@w3.org>
2011-11-16 21:39, Philip TAYLOR wrote:

> I think that Jukka (most unusually) was not 100% precise
> in his explanation.

You're right.

  My understanding is as follows --
>
> Given
>
> <base href=foo />
>
> the extra ">" would not "be inside the <head> element",
> but would instead trigger an automatic implied closure
> of the <head> element, a further implied opening of
> the <body> element, and the re-insertion of the ">"
> into the body. This would represent an error in HTML
> 4.01 Strict but not in HTML 4.01 Transitional.

Well, something like that, and I think this is what Ville referred to, 
too. But it's more complicated. Usually a <base> tag is not meant to be 
the last element inside <head>. And if you have, say,

<base href=foo />
<link ...>

then, after the ">" has implicitly closed the <head> element and opened 
the <body> element, the <link> element is invalid, no matter which HTML 
version is used.

Regarding Ville's comment "the cases where it'd work as the author 
intended are very rare", I think it applies to _validation_ - the 
validation process will usually get into a wrong track, for reasons 
discussed. But in _browsers_, it does not matter, as they just ignore 
the "/" and don't see any extra ">".

Yucca
Received on Wednesday, 16 November 2011 20:00:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:49 GMT