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

RE: Style tag not validated correctly for HTML 4.01

From: Gavin Lambert <gavinl@compacsort.com>
Date: Wed, 29 Oct 2003 18:40:31 +1300
To: "'Liam Quinn'" <liam@htmlhelp.com>
Cc: <www-validator@w3.org>
Message-ID: <00fd01c39ddf$2b0f0ba0$2800a8c0@GavinLComputer>

<http://validator.w3.org/check?uri=http%3A%2F%2Fpueblo.sf.net%2F&doctype
=HTML+4.01+Transitional&ss=1>
I know there are several problems with the HTML on this page, but still,
what I reported still seemed accurate....

Side note, I thought XML syntax is fine for HTML 4, so long as you
include a space, as "<br />".  I don't think I used any in this
document, though.

# Line 7, column 24:  document type does not allow element "STYLE" here
(explain...).
    <style type="text/css">
                          ^
# Line 163, column 6: end tag for element "HEAD" which is not open
(explain...).
  </head>
	  ^
[...]
   1: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
   2: <html>
   3: <head>
   4:   <title>Pueblo/UE News</title>
   5: <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
   6:   <basefont face="Verdana,Arial,Helvetica" size=2>
   7:   <style type="text/css">
   8:   <!--
   9: BODY {
[...]
 160: }
 161:   -->
 162:   </style>
 163: </head>
 164: <body bgcolor="#FFFFFF" text="#000000" style="margin: 0px 10px
10px 0px;">
 165:   <table border=0 width="100%" cellspacing=0 cellpadding=0>


> -----Original Message-----
> From: Liam Quinn [mailto:liam@htmlhelp.com] 
> Sent: Wednesday, 29 October 2003 16:03
> To: Gavin Lambert
> Cc: www-validator@w3.org
> Subject: Re: Style tag not validated correctly for HTML 4.01
> 
> 
> On Wed, 29 Oct 2003, Gavin Lambert wrote:
> 
> > I just tried the validator at <http://validator.w3.org/check>, 
> > and it seems to have a bug:
> > 
> > I'm doing an HTML 4.01 Transitional validation, and it claims 
> > "document type does not allow element "STYLE" here".
> > 
> > "Here", in this case, being inside the <HEAD> element.  Of course, 
> > according to section 14 of the HTML 4.01 spec, that's where it 
> > should be.
> > 
> > Things just go downhill from there, as the next error I get is "end 
> > tag for element "HEAD" which is not open"; reacting to closing the 
> > HEAD element after closing the STYLE element (which is, I repeat, 
> > directly contained in the HEAD element).
> 
> It would be easier to diagnose if you provided the URI of an 
> example.  
> I'd guess that you're ending the HEAD element before the 
> STYLE element by using loose text or XML syntax for empty 
> tags.  (Don't use XML syntax in 
> HTML 4.)
Received on Wednesday, 29 October 2003 00:40:49 GMT

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