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

Jukka K. Korpela jkorpela at cs.tut.fi
Thu Mar 31 08:58:51 PST 2005

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/

More information about the whatwg mailing list