[Top][All Lists]

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

Re: id attributes for header elements

From: Jean-Christophe Helary
Subject: Re: id attributes for header elements
Date: Sun, 26 Dec 2021 09:59:00 +0900

> On Dec 26, 2021, at 7:10, Per Bothner <per@bothner.com> wrote:
> (This is related to the "control over sectioning and splitting: thread,
> as it may make it easier to provide a clean solution.)
> Currently, a header element generates an empty <span id="...> element.
> For example:
> @subheading Electron
> generates (assuming no conflicting "Electron" anchor or node):
> <span id="Electron"></span><h4 class="subheading">Electron</h4>
> while:
> @anchor{Electron}
> @subheading Electron
> generates:
> <span id="Electron"></span><span id="Electron-1"></span><h4 
> class="subheading">Electron</h4>
> Two requests:
> (1) Don't generates the implicit id="Electron-1" when it immediately follows
> an explicit id="Electron".
> (2) Add the id attribute to the <h4> element rather than generate an empty 
> <span> node.
> Thus I'd like to see, for both inputs above:
> <h4 id="Electron" class="subheading">Electron</h4>
> I think this is both cleaner and it would make for easier post-processing,
> such as by JavaScript or XSLT.

Or CSS. Since now we can have a target on the "Electron" id that affects the 
whole H4 and not an empty span that's probably only used for navigation 

Jean-Christophe Helary @brandelune

reply via email to

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