On Tue, January 31, 2012 8:06 am, Jim Adcock wrote:
<a class="page" id="pg0nnn" title="nnn" >
A lot of tools will automatically throw away unref'ed anchors,
If so (IIRC this is the case with the CKEditor) that is the fault of the tool, not of the markup language. The tool /I/ have written not only allows this construct, but relies on it to extract "pages" from an HTML file.
and I believe "legal placement locations" of anchors becomes much more problematic in HTML5.
First of all, it is important to note that while HTML5 is on the horizon, it is not yet even an official specification. Second, while I have seen much discussion tangential to this issue, I have seen nothing to definitively indicate that empty anchors which have 'class' and 'id' attributes have been deprecated or abolished in HTML 5 (although I seem to recall that it /does/ specifically require end tags for <a> even when empty). One web site recommends not using <a> as a target, instead adding an 'id' attribute to the next nearest element. This of course makes it impossible to specify a precise point in "phrasing content." Others have suggested that to achieve this precise targeting an empty <span> element could be inserted having the same 'id', 'class', and 'title' attributes as would have otherwise been attached to the <a> tag. In my opinion, this "cure" is worse than the disease. In any case, my goal is to develop an HTML "master" format that could then be used to derive other formats. Even if <a> becomes deprecated as an "anchor" in HTML 5, it will still serve a useful purpose in the "master" format, and HTML 5 compliant User Agents will be compelled to at worst ignore it which would be completely acceptable at that point in its life-cycle.