W3C home > Mailing lists > Public > www-validator@w3.org > July 1999

Implied end of HEAD element

From: Kynn Bartlett <kynn@idyllmtn.com>
Date: Thu, 29 Jul 1999 18:22:11 -0700
Message-Id: <4.1.19990729181446.0245b030@mail.idyllmtn.com>
To: www-validator@w3.org
What determines the end of the HEAD element if the end (and
beginning) tags are omitted?

I had understood that it was the presense of elements not
found in %head.content + %head.misc that signalled the end
of the HEAD element, but when I feed the validator the
following file (found at http://www.kynn.com/test.html):

  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
            "http://www.w3.org/TR/REC-html40/strict.dtd">
  <TITLE>This is an example of poor HTML</TITLE>
  <BR>
  <LINK REL="stylesheet" TYPE="text/css" HREF="style.css">
  <BODY>
    <P>This is an example of poor HTML</P>
  </BODY>

I get this error:

Error at line 4:
     <BR>
      ^  document type does not allow element "BR" here

My expectation was that the <BR> would signal the end of the
HEAD element, and <BR> would pass fine, <LINK> would get flagged
as something that doesn't belong in a BODY element, and <BODY>
would get flagged because there's already a BODY element that
started when the <BR> was encountered.

This doesn't seem to be the case, though, and the parse tree
looks like this: (HTML tags omitted)
 
   <HEAD>
     
      <TITLE>
          This is an example of poor HTML
      </TITLE>     
      <BR>
        
      </BR>     
      AHREF CDATA style.css     
      ATYPE CDATA text/css     
      AREL CDATA stylesheet     
      <LINK>
        
      </LINK>     
   </HEAD>  
   <BODY>
     
      <P>
          This is an example of poor HTML
      </P>     
   </BODY>  

Is this simply my misunderstanding of what should be happening?
If so, please illuminate me on how implied tags work. :)

-- 
Kynn Bartlett  <kynn@idyllmtn.com>                   http://www.kynn.com/
Chief Technologist, Idyll Mountain Internet      http://www.idyllmtn.com/
Catch the Web Accessibility Meme!                   http://aware.hwg.org/
Next Online Course starts August 2         http://www.kynn.com/+nextclass
"Pissing off comic book fans isn't a business problem, it's a sport." -NK
Received on Thursday, 29 July 1999 21:28:44 GMT

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