[html5] <header>, <hgroup> and subheadings

Micky Hulse mickyhulse.lists at gmail.com
Wed May 1 16:56:09 PDT 2013


Hello,

Using the outliner (ya'll probably know this link by heart):

<http://gsnedders.html5.org/outliner/>

Example #1:

<doctype html>
<title>Hello, world!</title>
<h1>This is a section</h1>
<article>
    <heading>
        <hgroup>
            <h1>Primary heading</h1>
            <h2>Secondary heading</h2>
            <h3>Tertiary heading</h3>
        </hgroup>
    </heading>
</article>

... creates this outline:

1. This is a section
    1. Primary heading

Example #2:

<doctype html>
<title>Hello, world!</title>
<h1>This is a section</h1>
<article>
    <heading>
        <hgroup>
            <h1>Primary heading</h1>
            <h2>Secondary heading</h2>
        </hgroup>
        <h3>Tertiary heading</h3>
    </heading>
</article>

... creates this outline:

1. This is a section
    1. Primary heading
        1. Tertiary heading

Question:

Which is better in terms of showing a subheading?

I like how the outliner, in Example #2, insets the "Tertiary heading"
on a new level. To me, that's how I would expect an outline to show a
subheading of an article.

On the other hand, everything I've read says to group headings
together using <hgroup>.

I know things are open to interpretation, but in your opinions, would
it be wrong for me to leave the <h3> outside of the <hgroup>?

In the real world, I'm using the <h3> for optional subheadlines to my articles.

Thanks!
Micky



More information about the Help mailing list