473,325 Members | 2,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Document seems invalid, but validates as HTML 4.01 strict

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
2 2083
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: bradwiseathome | last post by:
I have code that works in IE 6 but does not work in FireFox 1.0.2, how can I change it so it works in both browsers? <html> <head> <script language="JavaScript" type="text/JavaScript">...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
9
by: Yeah | last post by:
I have web document A which contains six links that all go to document B. However, all hyperlinks must go to a different location within that document (similar to anchors: A NAME= etc.). How do...
11
by: Michael Powe | last post by:
How can I make an XHTML-compliant form of an expression in this format: document.write("<scr"+"ipt type='text/javascript' src='path/to/file.js'>"+"</scr"+"ipt>"); this turns out to be a...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.