Re: Attributes with no value

At 07:12 PM 11/9/00, Kynn Bartlett wrote:
>Actually, an attribute alone means the same thing as attr="attr",
>so <img alt> means the same as <img alt="alt">.

No. This applies to boolean attributes only.

A very small number of HTML-attributes (approx 5?) can take values in form 
of boolean variables. These values are interpreted as "true" when the 
attribute is present or "false" when the attribute is absent, e.g.

<!ATLIST OPTION
         selected (selected) #IMPLIED  >

Boolean attribute can take one single value - itself.  The name of 
attribute type and value type are the same.
<option selected="selected">

As the presence of the attribute alone imples the value to be "true",  the 
value can be omitted - minimized.
<option selected>

/e

Received on Friday, 10 November 2000 12:22:05 UTC