W3C home > Mailing lists > Public > www-validator@w3.org > October 2001

Re: I would like to point this out

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Thu, 25 Oct 2001 17:09:26 +0200
To: David Wright <dwright5@nyc.rr.com>
Cc: <www-validator@w3.org>
Message-ID: <rdagtt4e3dk651qnmhd27i30qf0hk5gatv@4ax.com>
* David Wright wrote:
>I am trying to validate a file (by uploading). Transitional 4.01
>i have eliminated all error except this one any ideas?
>
> 1: 
>   2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>   3:         "http://www.w3.org/TR/html4/loose.dtd">

HTML 4 selected 

>  18: <link rel="stylesheet" type="text/css" href="css/external.css" />
>  19: </head>

Note the trailing />, this is interpreted as

  <link ...>&lt;
  </head>

in HTML 4. PCDATA is not allowed in <head>, so <head> is closed and
<body> is opened, validator finds </head> and you get

>the error i receive is
>  </head>
>        ^
>
>Error: end tag for element "HEAD" which is not open; try removing the end
>tag or check for improper nesting of elements

Now it finds <body> while already inside <body> and you get

>*    Line 21, column 5:
>
>  <body>
>       ^
>
>Error: element "BODY" not allowed here; check which elements this element
>may be contained within

HTH,
-- 
Björn Höhrmann { mailto:bjoern@hoehrmann.de } http://www.bjoernsworld.de
am Badedeich 7 } Telefon: +49(0)4667/981028 { http://bjoern.hoehrmann.de
25899 Dagebüll { PGP Pub. KeyID: 0xA4357E78 } http://www.learn.to/quote/
Received on Thursday, 25 October 2001 11:10:32 GMT

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