Re: HTML attribute with no value

Hello Aharon,

Mati gave some background from HTML4. In my understanding, the 
convention of being able to use just the attribute name
(i.e. <elem attr1 />) to represent the same attribute value as the 
attribute name (i.e. <elem attr1='attr1' />) goes back to SGML.

On the other side, below is what HTML5 says. It seems to be extremely 
dry, and especially not too helpful for people designing new attributes 
(like us). Therefore, I think the best thing is to contact the HTML WG 
and get some additional information.

http://dev.w3.org/html5/spec/syntax.html#attributes-0
 >>>>
Empty attribute syntax

     Just the attribute name. The value is implicitly the empty string.

     In the following example, the disabled attribute is given with the 
empty attribute syntax:

     <input disabled>

     If an attribute using the empty attribute syntax is to be followed 
by another attribute, then there must be a space character separating 
the two.
 >>>>

Regards,   Martin.

On 2010/09/19 23:25, Aharon (Vladimir) Lanin wrote:
> In the f2f, we said:
>
> ubi syntax is ubi=”ubi”|””|”off”. The “ubi” and empty string values are
> equivalent, and mean that bidi isolation is on for the element.
>
>
> I am confused about why we needed two values meaning "on", and if so, why
> neither one of them is named "on".
>
> The crux of my question is what, exactly, does the HTML spec say about an
> attributes with no value, e.g.<span foo>? Is it always equivalent to<span
> foo=foo>, or to<span foo="">, or something else?
>
> If<span foo>  is equivalent to<span foo=foo>, I do not see why we need an
> empty string value.
>
> If, on the other hand,<span foo>  is equivalent to<span foo="">, I
> understand why we need an empty value as well as an equivalent non-empty
> value, but I do not understand why the latter has to be the meaningless
> "ubi". I would prefer ubi=”on”|””|”off”.
>
> Aharon
>

-- 
#-# Martin J. Dürst, Professor, Aoyama Gakuin University
#-# http://www.sw.it.aoyama.ac.jp   mailto:duerst@it.aoyama.ac.jp

Received on Monday, 20 September 2010 04:42:18 UTC