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

[whatwg] Allow trailing slash in always-empty HTML5 elements?

From: Steve Runyon <s.runyon@gmail.com>
Date: Wed, 29 Nov 2006 11:18:21 -0500
Message-ID: <2307bb790611290818q16c83db3re756eec60f66c5c2@mail.gmail.com>
To me, '</' or '/>' mean the tag's done.  Therefore, '<select
/>...</select>' (or anything similar) is just plain wrong -- that would be a
select list with nothing in it, then some options that are hanging out
somewhere on their own, then an unmatched closing select.  This shouldn't
validate, serializers shouldn't allow it, and deserializers should simply
ignore the options and '</select>' (or maybe dump the options' text to the
output and just ignore the '</select>').

Now this, '<img src="..." />' -- which is what I thought this discussion was
about initially -- is perfectly valid; it's nothing more than a tag without
content.


On 11/29/06, Stewart Brodie <stewart.brodie at antplc.com> wrote:
>
> "Robert Sayre" <sayrer at gmail.com> wrote:
>
> > On 11/29/06, Lachlan Hunt <lachlan.hunt at lachy.id.au> wrote:
> > >
> > > I do not think it's a good idea to make the trailing slash conforming.
> > > Although it is harmless, it provides no additional benefit at all and
> it
> > > creates the false impression that the syntax actually does something.
> >
> > It does do something, in systems that think they are using XML
> > (whether they actually are is another matter). It's possible it will
> > prevent  many information-free validation errors, and give the HTML5
> > more credibility as a result. Warning people about <img /> in the
> > validator is a waste of their time.
> >
> > > It's not a
> > > good idea to confuse them any more by giving the impression that it
> > > works for some elements but not others.  It's better to just say it
> > > doesn't work at all and forbid it in all cases.
> > >
> >
> > Better? This is an opinion, and it's not backed up by data. So far, it
> > looks like Sam has the data on his side. People do it, and it tends to
> > work interoperably.
>
> Except when it doesn't.
>
> For example, here's a fragment of hotmail.com's signup page, served as
> "text/html".  It's the only example I've come across to date:
>
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
> Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
> ...
> <select id="iRegion" name="pff00000000010004" />
> <script>...</script>
> </select>
> ...
>
>
> The script just document.write's loads of option tags (it's the country
> menu).  It's hard to know what the author thought was going on.  Did they
> think it was XHTML and just got stymied by the server configuration?
>
> I'm still in favour of permitting the trailing slash, personally.
>
>
> --
> Stewart Brodie
> Software Engineer
> ANT Software Limited
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20061129/53575061/attachment.htm>
Received on Wednesday, 29 November 2006 08:18:21 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:50 UTC