472,954 Members | 1,670 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,954 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 2064
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...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
1
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.