- From: Ian Hickson <ian@hixie.ch>
- Date: Wed, 6 Jan 2010 04:39:17 +0000 (UTC)
- To: Joe D Williams <joedwil@earthlink.net>
- Cc: public-html@w3.org
On Tue, 5 Jan 2010, Joe D Williams wrote: > "Thomas Broyer" <t.broyer@ltgt.net> replied > > As an optional attribute whose value can only be the empty string or > > the same as the attribute's name? > > Ok, so that is a rule for XHTML but does not describe or explain the > text/html usage where the atttribute may appear in html as a string not > followed by = but having the special rule that says if only the > attribute name string is present and followed by separator then that is > ok and the default value is the empty string which means a default > functionality that you can go read in the spec what it does. There's nothing special about boolean attributes in this case. In the HTML5 text/html syntax the attribute value can always be omitted to say that the value is the empty string. For example: <img src class title> ...is equivalent to: <img src="" class="" title=""> That's a syntactic thing, just like you can have a line break between attributes or you can have a trailing / in "void" elements: <img src class title /> All three of the elements above are indistinguishable at the DOM level. In XML, the value can never be omitted (though it can in many cases be the empty string). XML has a different syntax than text/html HTML. HTH, -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 6 January 2010 04:39:48 UTC