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 13:45:03 -0500 (EST)
Message-Id: <199812301845.NAA08642@locke.ccil.org>
To: www-dom@w3.org
keshlam@us.ibm.com scripsit:

> If someone hands a parser a badly-formed HTML file without the <HTML>
> wrapper, does the DOM assume that an HTML element will be synthesized to be
> the single content root (DocumentElement)? Or should an HTML DOM accurately
> record the multiple-root structure of the broken file?

There is no such thing as an HTML document without an HTML element.
HTML, like HEAD and BODY and a few other elements, allows omission of
both the start-tag and the end-tag.  So a (minimal) HTML document:

	<TITLE>Foo</TITLE>Bar

has in fact the structure

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

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

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