W3C home > Mailing lists > Public > public-html-data-tf@w3.org > November 2011


From: Jeni Tennison <jeni@jenitennison.com>
Date: Sat, 12 Nov 2011 21:55:03 +0000
Cc: Henri Sivonen <hsivonen@iki.fi>, HTML Data Task Force WG <public-html-data-tf@w3.org>
Message-Id: <BCED2AF2-A724-4B42-B94E-20E9A0551143@jenitennison.com>
To: Toby Inkster <tai@g5n.co.uk>

On 12 Nov 2011, at 21:44, Toby Inkster wrote:
> On Sat, 12 Nov 2011 20:45:22 +0000
> Jeni Tennison <jeni@jenitennison.com> wrote:
>> as a valid HTML5 document despite it not having a <body> element, but
>> perhaps that's a validator.nu bug…)
> In HTML, some elements have optional end tags, right? So the following
> is valid:
> 	<p>Foo
> 	<p>Bar
> Less well known is that some elements also have optional start tags.
> IIRC, only four such elements exist: <html>, <head>, <body> and
> <tbody>, all of which co-incidentally have optional end tags too.
> Thus it is possible to have elements which exist, and are represented
> in the DOM tree, but have no start or end tags in the byte stream.

Of course! Thank you for that explanation. So we definitely need to tell people to watch out if they omit <head> and/or <body> tags...

Jeni Tennison
Received on Saturday, 12 November 2011 21:55:23 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:58:06 UTC