Re: Suppressed content in HEAD: myth or reality?

Brian Behlendorf (
Thu, 4 May 95 02:41:20 EDT

On Wed, 3 May 1995, Eric Bina wrote:
> > In some circles, the conventional wisdom is "if you find data
> > characters anywhere in the <HEAD> element, don't display them in the
> > same text window where you show the <body> stuff."
> >
> > This has been in some versions of the HTML specs for a long time.
> >
> > I think Mosaic 2.5beta implemented it.
> >
> > Are folks willing to count on this convention, even though there are a
> > lot of browsers out there that don't abide by it? (e.g Mosaic 2.4).
> Any good suggestions on what to do when the user opens a <HEAD> and forgets to
> close it?

Put up a big red dialog box that says "BAD HTML", with an explanation
"Apparently you forgot to check your <HEAD>..." Etc.

> At what point should we assume the closure of the <HEAD>? We can't
> do it at the first thing that the browser thinks shouldn't be there, because
> in that case, a browser that didn't understand <STYLE>data</STYLE> would
> assume closure of the HEAD as soon as it saw "data". I suppose we can assume
> it at the <BODY>, but we still leave the opportunity for a doc with <HEAD>,
> not </HEAD> and no <BODY> which would just disappear into limbo inside the
> browser. It sure worries me.

Change the definition of "what shouldn't be in <HEAD>" from "any tag that
has never been defined as being in <HEAD>" to "any tag that has only ever
been defined as being in <BODY>", and there won't be a problem with
<STYLE>. I.e., this will render fine:

<TITLE>My document</TITLE>
H1.font = helvetica
<H1>My Document</H1>

The parser will know what to do between <TITLE> and </TITLE>, throw out
everything up to <H1>, and then render <H1>My Document</H1>.


--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-- http://www.[hyperreal,organic].com/