bug-texinfo
[Top][All Lists]
Advanced

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

Re: use id="xx" instead of <a name="xx"> in html output


From: Gavin Smith
Subject: Re: use id="xx" instead of <a name="xx"> in html output
Date: Sun, 14 Feb 2016 13:44:34 +0000

On 12 February 2016 at 07:48, Per Bothner <address@hidden> wrote:
> Browsers generally ignore tags they don't understand, so I believe
> there is no harm in using <section> instead of <div>, even for older
> browsers.  However, this would need to be tested.

I don't like the idea even if it would work - I'd rather we output
valid HTML, for whatever version we claim to output. For one thing,
that would facilitate the use of validation tools by removing a source
of warnings.

> OTOH, if there is concern, there isn't really
> much difference between:
>
>   <section class="chapter" id="Chapter1">
>
> and
>
>   <div class="chapter" id="Chapter1">
>
> The former is slightly more readable and explicit,
> but in practice the difference is minor.  Especially if
> you add a stylesheet rule:
>
>   section { display: block }

One difference I've just discovered is that heading commands <h1>,
<h2> are different in a <section>: their heading level is determined
by the level of the section. This wouldn't be a problem for us as long
as the <section>'s are properly nested. Here's an article on it:
https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Sections_and_Outlines_of_an_HTML5_document



reply via email to

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