RE: revisiting heading advice

> From: Leif Halvard Silli [mailto:xn--mlform-iua@målform.no]
> Sent: Sunday, January 12, 2014 6:12 PM
> 
> Jukka K. Korpela, Thu, 09 Jan 2014 23:21:06 +0200:
> > 2014-01-09 17:58, Leif Halvard Silli wrote:
> >> Jukka K. Korpela, Thu, 09 Jan 2014 17:04:29 +0200:
> 
> > It might make sense practically to treat
> >
> > <h1>...</h1>
> > <h2>...</h2>
> > <h4>...</h4>
> >
> > so that the rank 4 heading is really at level 3, on the assumption
> > that such markup has been used for rendering reasons
> 
> I work on the formatting of a text book with this structure:
> 
> Chapter (H1)
>  [text]
>   Subheading (H2)
>    [text]
>     Task heading (H3)
>      [text]
> 
> But quite often, the a chapter might have no subheadings, while it still still
> contains tasks and task headings. In that case, I don’t want the task headings
> to move up to level 2, so I still use h3. I also don’t want any change in the
> table of contents, where I use different styles for the different levels.
> 
> I don't feel that I select h3 for styling reasons though - it has to do with
> semantics …

Except you just said you use different styles for different levels and don't want that disruption in the table of contents. Which tells me you are making that decision based on the style, not the semantics. Unless you can clarify how you feel it's truly a semantic decision to skip that level.

To me, the issue you describe shouldn't be reflected in your HTML, but in your CSS.

I think the task headings are at whatever level the natural flow drops them (except <h7> and higher, since that doesn't exist). IMO, it's appropriate that the <h4> should be structurally moved up to an <h3> when parsed. Since the browsers aren't doing that anyways (as far as I know), then it should be coded as an <h3> anyway.

Received on Monday, 13 January 2014 15:47:26 UTC