RE: Validator errors

Lars,
 
You got that error message because of the way the validator works.
 
When it came to the first error -- the extra ending </meta> tag -- it was
then out of sync. Personally I would assume it would report the error on the
very next tag pair, but having run across this a time or two in the past, I
look first to these other errors and ignore the missing "head" error until
I've ruled out the other problems. By then the error usually goes away.
 
Note that XHTML requires ALL tags to be closed, whereas as HTML only
requires the tags that are paired to be closed -- and then not all of them
are required. For example, you can have an opening <p> without a </p>, a
<td> with a </td> and a <li> without a </li>. Personally I always put them
in, but they aren't required in HTML. They are in XHTML. Also, tags that
don't have ending tags in HTML still require the ending tag in XHTML. So
<meta> becomes <meta /> and <br> becomes <br />.
 
--Doug

  _____  

From: www-validator-css-request@w3.org
[mailto:www-validator-css-request@w3.org] On Behalf Of Lars Berg
Sent: Thursday, January 04, 2007 6:54 AM
To: www-validator-css@w3.org
Subject: Re: Validator errors


Thank you, Karl, Doug and Andreas for your comments. 
I've learned that these ending signs ( />) actually are "ending-tags" right
inside the opening-tag.
I didn't know that before as I'm still left with a html perspective and
realize I need to update it to cover also an xhtml perspective.

However, my initial problem was to validate my xhtml file and got stuck with
an error message that said there was a missing </head> tag when there
actually was one. Either this is due to further ignorance from my part or it
might be a bug in the validator.

So, the question remains. Why do I get this error about the </head> ending
tag?


The element type "head" must be terminated by the matching end-tag
"</head>".

Regards,
Lars

Received on Friday, 5 January 2007 04:55:25 UTC