By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,043 Members | 1,126 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,043 IT Pros & Developers. It's quick & easy.

Document seems invalid, but validates as HTML 4.01 strict

P: n/a
I've seen this page, that seems invalid to me. Doctype is incomplete
and it does not have a <bodytag. However, W3C validator validates it
as HTML 4.01 strict, even when I force the DOCTYPE. I think it should
be a bug in the validator, but perhaps, I missed something. What do
you think?

Page:
http://www.bcc.ufla.br/~lpgomes/

Validator:
http://validator.w3.org/check?uri=ht...%2F~lpgomes%2F
Sep 4 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
In comp.infosystems.www.authoring.html on Thu, 4 Sep 2008 12:01:09
-0700 (PDT), Bruno Schneider <bo*********@gmail.comwrote:
I've seen this page, that seems invalid to me. Doctype is incomplete
That's unusual, but the result seems to be that the validator treats
it as "strict".
and it does not have a <bodytag.
<bodycan be implied, not specified, in HTML. HTML is a subset of
SGML, not XML.
However, W3C validator validates it
as HTML 4.01 strict, even when I force the DOCTYPE. I think it should
be a bug in the validator, but perhaps, I missed something. What do
you think?
I think it's nice to see an 18-year-old sharing his photos somewhere
other than crap sites like myspace or facebook.

I think it's also nice that the W3C validator takes "strict" as its
default.

The site would benefit from abandoning tables for layout, of course.
Page:
http://www.bcc.ufla.br/~lpgomes/

Validator:
http://validator.w3.org/check?uri=ht...%2F~lpgomes%2F
--
PJR :-)
slrn newsreader (v0.9.9): http://slrn.sourceforge.net/
extra slrn documentation: http://slrn-doc.sourceforge.net/
newsgroup name validator: http://pjr.lasnobberia.net/usenet/validator
Sep 4 '08 #2

P: n/a
Peter J Ross wrote:
>I've seen this page, that seems invalid to me. Doctype is incomplete

That's unusual, but the result seems to be that the validator treats
it as "strict".
It does and it must do so. The declaration
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
is correct in SGML terms. Quite apart from this, it violates the HTML 4.01
specification, which imposes the restriction that the URL string must be
present and must have a specific value; but this is not a formal requirement
in the sense that matters here.
I think it's also nice that the W3C validator takes "strict" as its
default.
It doesn't. The doctype explicitly specifies the Strict DTD, even though it
does not explicitly use the word "Strict".

The statement "This means that the resource in question identified itself as
'HTML 4.01 Strict'" is misleading. But the markup validator tries hard to be
useful to HTML authors, even though validation as such is nothing
HTML-specific. And it often tries too hard. The appropriate statement would
be that the SGML document that was submitted does not contain reportable
markup errors (in the SGML sense).

The W3C validator actually uses HTML 4.01 Transitional as the default, in a
sense, as you see if you try to validate markup via the direct input method
and type, say

<title>foo</title>
bar

You will then see rather confusing messages, headed by "Errors found while
checking this document as HTML 4.01 Transitional!", and yet one of the
messages says "no document type declaration; will parse without validation",
and then you get an error message about the string bar - which you would not
get if you really validated against HTML 4.01 Transitional.

The morale? Error recovery is often hard, and especially hard in a
validator. If you ask me, a validator should stop when it detects that no
doctype has been specified (in markup or with a command, or maybe with a
default), since validation without a doctype really doesn't make sense.

Yucca

Sep 4 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.