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

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

From: Robert Koberg <rob@koberg.com>
Date: Sat, 26 Mar 2005 07:19:15 -0800
Message-ID: <42457D73.5070708@koberg.com>
To: www-html@w3.org

Bjoern Hoehrmann wrote:
> * Robert Koberg wrote:
> 
>>I generate XHTML/JSP/Velocity pages from XSL and XML. One thing always 
>>seems clumsy to me: that is, why was something like an INPUT's checked 
>>attribute be set to "checked" and not true/false?
> 
> 
> You can write SGML declarations such that for enumerated attribute
> values only the value must be specified so you can write
> 
>   <input ... checked> rather than
>   <input ... checked="checked">
> 
> Using true/false as in
> 
>   <input ... true>


It is probably a lack of understanding in SGML, but I don't understand 
why you use true there and not checked.

Anyway, next I'll ask why is the following invalid?

<input ... checked="">

thanks,
-Rob

> 
> would look a bit odd, is more likely to clash with some other attribute
> value and is more difficult to extend ("true", "false" and some third
> value in the same value space is a bit odd, too).
Received on Saturday, 26 March 2005 15:19:16 GMT

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