On Sun, 29 Sep 2024 18:08:10 GMT, Jonathan Gibbons <j...@openjdk.org> wrote:

>> Agree; I have recommedned consolidating id property into h2 without an extra 
>> a tag.
>
> `<dfn>` is a semantic tag to indicate the defining instance of a term. It may 
> be used by search engines, to improve their results.   When `<dfn>` is used 
> as intended, it may be reasonable and convenient to put an `id` on the tag, 
> to provide a link target for elsewhere in the documentation. It may also be 
> convenient to add `id` to other locations, especially headers, but note that 
> `javadoc` now does that automatically.
> 
> The usage of `<a name="...">` is a legacy usage from HTML 4, before the 
> improved rules for `id` in HTML 5.  It would be a reasonable cleanup to move 
> away from such tags, putting an equivalent `id` on either a replacement tag 
> (such as `<span>`) or on an appropriate nearby tag.

Thanks for the HTML tip; will add an id to the dfn tag.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/21215#discussion_r1780318858

Reply via email to