473,698 Members | 2,182 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2100
In comp.infosystem s.www.authoring.html on Thu, 4 Sep 2008 12:01:09
-0700 (PDT), Bruno Schneider <bo*********@gm ail.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
1828
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"> function AttributeSelected() { var selectVal = document.forms.elements.options;
136
9379
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 code was littered with document.all and eval, for example, and I wanted to create a practical list of best practices that they could easily put to use. The above URL is version 1.0 (draft) that resulted. IMO, it is not a replacement for the FAQ,...
9
1829
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 I achieve this? Any pointers are appreciated. Thanks!
11
3104
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 non-trivial exercise. inserting '&lt;' and '&gt;' causes the browser to write the text to the page as literal text rather than as the intended script element. Using escape codes seemed to work (makes it standard compliant) but the text is not written to...
0
8673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9156
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8892
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7716
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4365
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3043
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2327
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.