Re: [VE][247] Add Subject Here

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 UTC