<header> Validation Problems - Has the W3C Validator Changed?

R

Roy Schestowitz

Hi folks, I haven't posted here in a long time, so please be gentle.
:)

One problematic page of mine used to validate until some time
recently when, apparently, something changed in the validator. I
don't think I have changed anything in the code/markup.

http://validator.w3.org/check?uri=http://schestowitz.com/

I wish I had an idea how to resolve this, but I don't know where
to start. Can someone lend me a hand here? Please?

,----[ Quote ]
| This page is not Valid HTML 4.01 Transitional!
|
| # error Line 29 column 22: document type does not allow element
| "STYLE" here.
|
| <style type="text/css">
|
| # Error Line 153 column 60: document type does not allow element
| "LINK" here.
|
| <link rel="stylesheet" href="/Nice_Title_Main/nicetitle.css">
|
|
| # Error Line 300 column 6: end tag for element "HEAD" which is not
| open.
|
| </HEAD>
|
| # Error Line 302 column 290: document type does not allow element
| "BODY" here.
|
| ...ezone_image(); status_msg(); init();">
`----
 
B

Beauregard T. Shagnasty

Roy said:
One problematic page of mine used to validate until some time recently
when, apparently, something changed in the validator. I don't think I
have changed anything in the code/markup.

The validator is correct. (As usual. said:
http://validator.w3.org/check?uri=http://schestowitz.com/

I wish I had an idea how to resolve this, but I don't know where to
start. Can someone lend me a hand here? Please?

Remove the XHTML closing slash on this line:
<link rel="pavatar" href="http://schestowitz.com/roy.png" />
 
J

J.O. Aho

Roy said:
Hi folks, I haven't posted here in a long time, so please be gentle.
:)

One problematic page of mine used to validate until some time
recently when, apparently, something changed in the validator. I
don't think I have changed anything in the code/markup.

http://validator.w3.org/check?uri=http://schestowitz.com/

I wish I had an idea how to resolve this, but I don't know where
to start. Can someone lend me a hand here? Please?

The validator gives the following explanation for your first error:

One common cause for this error is the use of XHTML syntax in HTML
documents. Due to HTML's rules of implicitly closed elements, this
error can create cascading effects. For instance, using XHTML's
"self-closing" tags for "meta" and "link" in the "head" section of
a HTML document may cause the parser to infer the end of the "head"
section and the beginning of the "body" section (where "link" and
"meta" are not allowed; hence the reported error).

Looking at your source, we have line 27:

<link rel="pavatar" href="http://schestowitz.com/roy.png" />

By copy your source, and remove the ' /' from line 27 and then run "Validate
by Direct Input", the validator gave the following result:

This Page Is Valid HTML 4.01 Transitional!

So conclusion, don't mix xhtml into html.
 
T

Toby Inkster

Roy said:
| # error Line 29 column 22: document type does not allow element
| "STYLE" here.
|
| <style type="text/css">
|
| # Error Line 153 column 60: document type does not allow element
| "LINK" here.
|
| <link rel="stylesheet" href="/Nice_Title_Main/nicetitle.css">
|
|
| # Error Line 300 column 6: end tag for element "HEAD" which is not
| open.
|
| </HEAD>

These sorts of errors usually mean that the BODY element has started
before you thought it would. Now, you might think, "but my <body> tag is
further down the page!", but the thing is, that the <body> start tag is
optional -- the validator assumes that the BODY element has started as
soon as it sees something that should be in the BODY.

In your case, it is caused by this:

<link rel="pavatar" href="http://schestowitz.com/roy.png" />

Which (as you're using HTML, not XHTML) is shorthand for this:

<link rel="pavatar" href="http://schestowitz.com/roy.png" >&gt;

Note the &gt; entity after the LINK element? This is some body text, so
the validator starts the BODY element here. As the BODY has started, the
HEAD element is implied to have finished (because a HEAD element can't
*contain* a BODY element!), which means that your STYLE element is invalid
(STYLE elements muct be contained within the HEAD), your stylesheet LINK
element is invalid (LINK elements must also be within the HEAD) and your
</head> tag is invalid (because the HEAD has already closed!)

That answer your question?
 
R

Roy Schestowitz

A million thanks to all of you for the reply.

I added that single line of XHTML about 3 weeks ago and totally forgot
about validation. I do almost everything in XHMTL nowadays and I just
couldn't sense (at the time) that I was 'mixing'. Speaking of which,
YouTube and Google Video (among others) are a bummer if you do XHTML,
which only justifies the claims made by many that XHTML is a bad idea
from the get-go.

I have corrected the error, I am aware of other design errors in my
coding (very old page) and again I'd like to thank all of you. The
error reported by the validator just weren't most informative for
reasons that Toby explained very well.

Noteworthy is the fact that I kind of miss alt.html. I just don't find
the time to hang around here anymore.

Best wishes!
 
D

dorayme

"Roy Schestowitz said:
A million thanks to all of you for the reply.

I added that single line of XHTML about 3 weeks ago and totally forgot
about validation. I do almost everything in XHMTL nowadays and I just
couldn't sense (at the time) that I was 'mixing'. Speaking of which,
YouTube and Google Video (among others) are a bummer if you do XHTML,
which only justifies the claims made by many that XHTML is a bad idea
from the get-go.

I have corrected the error, I am aware of other design errors in my
coding (very old page) and again I'd like to thank all of you. The
error reported by the validator just weren't most informative for
reasons that Toby explained very well.

Noteworthy is the fact that I kind of miss alt.html. I just don't find
the time to hang around here anymore.

Best wishes!

I know you don't mean to, but you make people like me look bad by
being so nice. Please stop.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top