[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: use <a> for hancors without content, not <span>
From: |
Gavin Smith |
Subject: |
Re: use <a> for hancors without content, not <span> |
Date: |
Sun, 26 Dec 2021 21:04:24 +0000 |
User-agent: |
Mutt/1.9.4 (2018-02-28) |
On Sun, Dec 26, 2021 at 10:18:55AM -0800, Per Bothner wrote:
>
>
> On 12/26/21 10:12, Patrice Dumas wrote:
> > But there is nowhere where id in a lone element is proposed, so this
> > argument is not very compelling not to use <a> for that purpose. <a>
> > was used for that semantically before, while <span> is explicitely
> > described as being relevant in relation to its content. For those
> > reasons, it still seems to me that <a> is better than <span> and
> > actually the best choice among elements.
>
> Using <a> this way makes me a little uncomfortable, but
> I don't have a strong objection.
As far as I understand the original way to do this in HTML was with
<a name="NAME"></a> but the "name" attribute has been deprecated (as
you know) in favour of "id", so using <a id="NAME"></a> would be the
natural thing to do. <a> is the "anchor" tag which can represent either
the source or destination of a link (maybe confusing terminology but
that's how the word "anchor" is/was used in the context of hypertext).
Even if the WHATWG don't endorse it there seems to be clear precedent
for using <a> this way. I don't feel strongly either way whether <span>
or <a> is better but your argument against <span> seems valid.
- use <a> for hancors without content, not <span>, Patrice Dumas, 2021/12/26
- Re: use <a> for hancors without content, not <span>, Per Bothner, 2021/12/26
- Re: use <a> for hancors without content, not <span>, Patrice Dumas, 2021/12/26
- Re: use <a> for hancors without content, not <span>, Per Bothner, 2021/12/26
- Re: use <a> for hancors without content, not <span>,
Gavin Smith <=
- Re: use <a> for hancors without content, not <span>, Jean-Christophe Helary, 2021/12/26
- Re: use <a> for hancors without content, not <span>, Patrice Dumas, 2021/12/26
- Re: use <a> for hancors without content, not <span>, Jean-Christophe Helary, 2021/12/26
Re: use <a> for hancors without content, not <span>, Patrice Dumas, 2021/12/26