[whatwg] [WA1] The a element could be empty
zcorpan at hotmail.com
Thu Sep 1 15:31:52 PDT 2005
The spec currently says:
|The a element must not be empty.
I think it would be more useful if it was changed to:
|If the a element has an href attribute set, then the element must not be
It is easier to use an empty a element as a placeholder to grab and use with
scripts later on, for instance:
var elm = document.getElementById("print");
elm.appendChild(document.createTextNode("Print this page"));
...rather than to create the link with script from scratch.
More information about the whatwg