Re: body tag problem

tedd wrote:
> One can create a page that does not have an open <body> tag, but does 
> have a close </body> tag and the page will validate. I assume that this 
> is a bug.
> 
>    http://www.webbytedd.com/body.html

It's not a bug.  In HTML, the start and end tags for the body element 
are optional, as defined in the DTD, and you may include none, either or 
both and still validate.

<!ELEMENT BODY O O (%block;|SCRIPT)+ +(INS|DEL) -- document body -->

The same is also true for the html, head and tbody elements.  Several 
others have required start tags with optional end tags, and others 
require both.  This does not apply to XHTML documents.

-- 
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/    Rediscover the Web
http://SpreadFirefox.com/   Igniting the Web

Received on Friday, 11 February 2005 02:55:32 UTC