W3C home > Mailing lists > Public > www-validator@w3.org > February 2010

(unknown charset) Re: Validator Trouble

From: (unknown charset) Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
Date: Thu, 4 Feb 2010 19:30:40 +0100
To: (unknown charset) Cory S <veneno-games@hotmail.com>
Cc: (unknown charset) www-validator@w3.org
Message-ID: <20100204193040358214.ae4e698d@xn--mlform-iua.no>
Cory S, Wed, 3 Feb 2010 22:09:49 -0400:

> 2) Line 36, Column 7:
>         end tag for element "HEAD" which is not open
> If you check the source, the element <head> was actually open... 

Your <head> had lots of proprietary "if IE" statements. And your 
intention clearly was that they should be nested. And they were nested, 
according to how IE sees it. But from HTML4's point of view there were 
no nesting, but only  a mess.  

The simplest thing is to make sure that the first/outer 'if IE' 
statement is a valid HTML4 comment - and then to make sure that all the 
other 'if IE' statements appear /inside/ that comment. THat is: You 
must make sure that all the nested 'if IE' statements are not 
themselves HTML4 comments.

E.g. like this:

<!--[if IE]>
	<![if IE 7]>
<link ..... >
	<![endif]>
	<![if !(IE 7)]>
<link ..... >
	<![endif]>
<![endif]-->

The key point is to understand that you have to satisfy two different - 
but similar - syntaxes simultaneously: It should be valid as 'if IE' 
statements (http://en.wikipedia.org/wiki/Conditional_comments) and 
valid as HTML4. There are many such gotchas when we are dealing with 
mark-up - one must try to develop the skill to see the code from 
different angles simultaneously. 

In addition to the above, you should also make the last 'if !IE' 
statement into a valid HTML4 comment:

<!--[if !IE]>
	<link type="text/css" rel="stylesheet" href="roboticsstyle.css">
<![endif]-->

If you do all this, then the message about '"HEAD" not open' will 
disappear.

> 4)         Line 173, Column 4:
>         NET-enabling start-tag requires SHORTTAG YES
> 
> When I state <br/>, it finds an error for it, even though it is the 
> correct html code for line break.

Please note that it only gives you a warning. It is valid, but there is 
a warning about potential issue. In 99.9999% of the cases, there are no 
risk in writing <br/> - although if I don't misremember, you it is 
recommended to have a space before the "/".

...... 
> When I try 34& (the html term for " ), it  only ends up messing with the 
page.

Perhaps you meant &#34; - you can also use &quot;

> The contest ends February 16th and I need my website to be validated 
> by then.

hi hi.
-- 
lhs
Received on Thursday, 4 February 2010 18:31:15 GMT

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