Re: RDFa in HTML vs XHTML

Toby,

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
-- 
Jeni Tennison
http://www.jenitennison.com

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