W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2006

[whatwg] Empty elements

From: Michael Enright <michael.enright@gmail.com>
Date: Wed, 15 Feb 2006 16:00:33 -0800
Message-ID: <eab6593d0602151600i67e65d9bu13e4f21ab2f0a06f@mail.gmail.com>
What about '<foo />' with a space between 'o' and '/' ? There are many
"legacy" pages with that kind of mark-up on <br> elements and so
forth.

On 2/15/06, Lachlan Hunt <lachlan.hunt at lachy.id.au> wrote:
> Tim Altman wrote:
> > On Wed, 15 Feb 2006 23:48:57 +0100, Ian Hickson <ian at hixie.ch> wrote:
> >
> >> On Wed, 15 Feb 2006, Tim Altman wrote:
> >>>
> >>> May OBJECT and CANVAS be treated as empty elements, i.e. <canvas /> and
> >>> <object /> if there is no fallback content?
> >>
> >> I don't understand your question.
> >
> > Let me rephrase: Is it valid for the object and canvas elements use the
> > empty element syntax?
>
> HTML: No, XHTML: Yes.
>
> >> If you mean "Can the string '<object/>' be treated as an empty element
> >> tag", the answer is no.
> >
> > You seem to have answered my question here.  Why not?
>
> Because it is XML syntax, not HTML syntax.
>
> According SGML rules, <foo/> has a different meaning from the same
> syntax in XML.  According to the new HTML5 parsing rules (due to
> complete lack of support for SGML), the '/' is an easy parse error and
> is essentially ignored.  Backwards compatibility reasons prevent the XML
> meaning from being retrofitted into HTML.
>
> --
> Lachlan Hunt
> http://lachy.id.au/
>
>
Received on Wednesday, 15 February 2006 16:00:33 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:26 UTC