W3C home > Mailing lists > Public > www-validator@w3.org > June 2005

Re: Validator

From: Liam Quinn <liam@htmlhelp.com>
Date: Mon, 27 Jun 2005 21:29:12 -0400 (EDT)
To: Xuan Yuan <xuanyuan@cox.net>
cc: www-validator@w3.org
Message-ID: <Pine.LNX.4.44.0506272121290.25691-100000@localhost.localdomain>

On Mon, 27 Jun 2005, Xuan Yuan wrote:

> I got 4 problems with validating HTML.
> 1. The W3C Validator says "document type does not allow element "META"
> here".The META elements are in the head element though.
> 2."document type does not allow element "STYLE" here" appears for my style
> element(it's in the head too)
> 3."end tag for element "HEAD" which is not open" appears on my head element.
> There are no other </head>'s(?).
> 4. "document type does not allow element "BODY" here"
> appears for no reason(!!!!!!!!!!!??????????).
> 
> 
> By the way, this document is HTML 4.01 Strict and the code is:
> 
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd">
> <html>
> <head>
> <title>The CVGA MUD!</title>
> <noscript><p>Your browser doesn't support javascript!Please upgrade your
> browser!</noscript>
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

The "noscript" element is not allowed in the "head", only in the "body".  
Since the </head> end tag and the <body> start tag are optional in HTML,
the <noscript> tag implies the end of the "head" and the start of the
"body", causing your subsequent "meta" elements to be in the "body".

The best solution would be to remove the "noscript" element.  The 
paragraph within it is misleading since the user's browser may very well 
support JavaScript, but the user may have disabled JavaScript support.

If your site depends on JavaScript, you should try to fix that problem.  
Search engine robots do not interpret JavaScript.  Also, many mobile Web
browsers don't support JavaScript, or they perform noticeably faster when
it is disabled.  Upgrading the browser on a mobile device is not always
possible.

-- 
Liam Quinn
Received on Tuesday, 28 June 2005 01:28:13 GMT

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