bug-texinfo
[Top][All Lists]
Advanced

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

Re: 6.1: HTML5 makes the attribute "name" in hypertext anchors obsolete.


From: Gavin Smith
Subject: Re: 6.1: HTML5 makes the attribute "name" in hypertext anchors obsolete.
Date: Fri, 5 Aug 2016 18:22:38 +0100

On 5 August 2016 at 16:59, Patrice Dumas <address@hidden> wrote:
> On Fri, Aug 05, 2016 at 10:33:41AM -0400, Robert Weiner wrote:
>> Just a small thing.
>>
>> As of Texinfo 6.1, HTML output is generating anchors like so:
>>
>> <a name="Smart-Keys"></a>
>>
>> The non-obsolete way of doing that now, compatible with HTML5 and prior
>> versions is:
>>
>> <a id="Smart-Keys"></a>
>
> Using id instad of name leads to validation errors with the 4.01
> doctype:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd";>
>
> That's because in this dtd, id type is ID which is too restrictive,
> while in html5 it is much less restricted.
>
> It is possible to abandon strict validity, I guess that most if not all
> browser are ok with id with less restrictive content, but having
> something valid is also very convenient to debug the html.

That's good to know. As long as we are targetting the 4.01
transitional version, we should definitely use <a name=...> instead of
<a id=...>.

Previous discussion of this here:

http://lists.gnu.org/archive/html/bug-texinfo/2016-02/msg00056.html

I think we should have an option to output HTML 5 to help facilitate
automatic processing of the HTML file with JavaScript.



reply via email to

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