W3C home > Mailing lists > Public > www-validator@w3.org > November 2000

Re: Attributes with no value

From: Eva von Pepel <eva@algonet.se>
Date: Fri, 10 Nov 2000 18:18:51 +0100
Message-Id: <>
To: Kynn Bartlett <kynn@idyllmtn.com>, pdf@bizfon.com, www-validator@w3.org
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.

         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>

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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:30:29 UTC