[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: use <a> for hancors without content, not <span>

From: Per Bothner
Subject: Re: use <a> for hancors without content, not <span>
Date: Sun, 26 Dec 2021 09:48:35 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0

On 12/26/21 09:33, Patrice Dumas wrote:

Currently <span id="id"></span> is used for anchors, whether they
originate from @anchor, in some cases from @node and sectionning
@-commands, @*index, ...  It is syntactically correct, but I think that
it would be semantically better to use <a> and keep <span> for inline
text that needs some kind of formatting information.

Also I propose to add class to the anchors to distinguish their source.

Any opposition/idea?

I don't think using <a> for anchors is a good idea.  The WHATHG spec says:

   "If the a element has no href attribute, then the element represents a 
   for where a link might otherwise have been placed, if it had been relevant, 
consisting of just the element's contents."

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a does not suggest or 
any examples of using <a> without an href attribute.

        --Per Bothner
per@bothner.com   http://per.bothner.com/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]