W3C home > Mailing lists > Public > www-html@w3.org > March 2005

Re: why, e.g., input/@checked="checked" ?

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Thu, 31 Mar 2005 19:58:51 +0300 (EEST)
To: fantasai <fantasai.lists@inkedblade.net>
Cc: www-html@w3.org, Robert Koberg <rob@koberg.com>, whatwg@whatwg.org
Message-ID: <Pine.GSO.4.58.0503311955170.14211@korppi.cs.tut.fi>

On Thu, 31 Mar 2005, fantasai wrote:

> What Jukka's trying to say is, attribute minimalization in SGML -- which
> lets you do things like
>    <input type="checkbox" checked>
> doesn't let you leave out the name of the attribute -- it lets you leave
> out the *value*.

Of course, you meant just the opposite: the name can is omitted (in
"classic" HTML), when the value is one of the declared enumerated values
of an attribute and no other attribute has such a value that way.

> So, for example, I could use attribute minimalization to
> shorten the 'type="checkbox"' part like so:
>    <input checkbox checked>

Indeed, i.e. the attribute _names_ input and checked are omitted.
Of course, browsers won't grok this except for the latter, since they only
know a limited number of special cases. Similarly, <h1 center>, no matter
how valid in "classic" HTML, won't work in practice.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Thursday, 31 March 2005 16:58:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:02 GMT