W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1998

Re: HTML APIs

From: John Cowan <cowan@locke.ccil.org>
Date: Wed, 30 Dec 1998 17:10:36 -0500 (EST)
Message-Id: <199812302210.RAA17480@locke.ccil.org>
To: mcc@arbortext.com (Mike Champion)
Cc: www-dom@w3.org
Mike Champion scripsit:

> >	<TITLE>Foo</TITLE>Bar
> 
> 
> Paste the above into a file and bring it up in Netscape. No complaints.  

Naturally not.

> This is certainly not valid HTML 4.0 (or any other version of the standard
> I can imagine),

Well, you're right, but not for the reason being discussed.  The
following small variant:

	<TITLE>Foo</TITLE><P>Bar

*is* valid HTML 4.0 (assuming you add an appropriate DOCTYPE declaration).
It is equivalent to:

	<HTML><HEAD><TITLE>Foo</TITLE></HEAD><BODY><P>Bar</P></BODY></HTML>

You can confirm this with the W3C HTML Validator Service.
I have put up http://www.ccil.org/~cowan/foo.html as a sample;
the Validator Service is at http://validator.w3.org .

Character data is not permitted directly within a BODY element,
which is what was wrong with my previous example.  But my points
about HTML, HEAD, and BODY all being present in all HTML documents,
even if both start-tags and end-tags are omitted, is correct.
See the HTML 4.0 DTD.

-- 
John Cowan					cowan@ccil.org
		e'osai ko sarji la lojban.
Received on Wednesday, 30 December 1998 16:31:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:46 GMT