<Hx> tags usage

Discussion in 'HTML' started by Noozer, Oct 11, 2004.

  1. Noozer

    Noozer Guest

    Just wondering what the proper usage is for heading tags.

    Is it proper to start using <h3> if you haven't used an <h1> or <h2> tag?

    Should the first heading tag always be <h1> and styled as necessary, then
    <h2> for the subheadings under <h1>, etc... Or, do you start with the closes
    matching <h> tag and style only what needs to be changed?

    Also, does it matter if there are unrelated areas on the page using
    headings? (for example, a menu area with a main heading followed by category
    subheadings and then another area on the page with a results heading
    followed by sections with headings.)
     
    Noozer, Oct 11, 2004
    #1
    1. Advertising

  2. Noozer

    Mitja Guest

    Noozer wrote:
    > Just wondering what the proper usage is for heading tags.
    >
    > Is it proper to start using <h3> if you haven't used an
    > <h1> or <h2> tag?

    Nope.

    > Should the first heading tag always be <h1> and styled as
    > necessary, then <h2> for the subheadings under <h1>,
    > etc... Or, do you start with the closes matching <h> tag
    > and style only what needs to be changed?

    The first.

    > Also, does it matter if there are unrelated areas on the
    > page using headings? (for example, a menu area with a
    > main heading followed by category subheadings and then
    > another area on the page with a results heading followed
    > by sections with headings.)

    I'm not sure I got this right, but I think what you're describing makes sense. A menu is, after all, one of the main sections on
    every page. A special section admittedly, but still, the word "menu" is structurally closer to a heading than, say, a paragraph.
     
    Mitja, Oct 11, 2004
    #2
    1. Advertising

  3. Noozer wrote:

    > Just wondering what the proper usage is for heading tags.
    >
    > Is it proper to start using <h3> if you haven't used an <h1> or <h2> tag?


    That depends on your POV, the specification isn't clear. Most experts are in
    agreement that H1 is a heading, H2 is a subheading, H3 is a subsubheading
    and so on - so it wouldn't make sense to start with H3.

    > Should the first heading tag always be <h1> and styled as necessary, then
    > <h2> for the subheadings under <h1>, etc... Or, do you start with the
    > closes matching <h> tag and style only what needs to be changed?


    Closest matching? You are forgetting that the default rendering is little
    more then coincidence.

    > Also, does it matter if there are unrelated areas on the page using
    > headings? (for example, a menu area with a main heading followed by
    > category subheadings and then another area on the page with a results
    > heading followed by sections with headings.)


    Again, a matter for debate. Personally I prefer to avoid it given the
    results when you take the headings out of context
    <http://www.w3.org/2003/12/semantic-extractor.html>. IMO if you have
    navigation that complicated, then you should look at simplifying it.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Oct 11, 2004
    #3
  4. Noozer

    Toby Inkster Guest

    Noozer wrote:

    > Should the first heading tag always be <h1> and styled as necessary, then
    > <h2> for the subheadings under <h1>, etc...


    Yes.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Oct 11, 2004
    #4
  5. Noozer

    Andy Dingley Guest

    On Mon, 11 Oct 2004 16:22:36 GMT, "Noozer" <> wrote:

    >Just wondering what the proper usage is for heading tags.


    There is none. Zilch. Nada.

    Maybe there is. In some contexts there certainly is - many authoring
    standards etc want to seem a simple tree structure, no skipped levels,
    only one <h1> and so on. But in _HTML_ there is no requirement on
    ordering them.

    Do what you like. Be "sensible" with them, according to some standard
    that keeps you happy. But it is definitely not "incorrect" to jumble
    them.

    The only real authoratitve guide is (as ever) here:
    http://www.w3.org/TR/html4/struct/global.html#edef-H1


    --
    Smert' spamionam
     
    Andy Dingley, Oct 11, 2004
    #5
  6. Noozer

    John Brandt Guest

    People using certain Assisitive Technology (screen readers and the
    like) can set the device to read only H1, H2, etc. They use this as a
    means for "skimming." Using the H's out of order will created a
    confused and less accessible webpage.

    jeb

    On Mon, 11 Oct 2004 16:22:36 GMT, "Noozer" <> wrote:

    >Just wondering what the proper usage is for heading tags.
    >
    >Is it proper to start using <h3> if you haven't used an <h1> or <h2> tag?
    >
    >Should the first heading tag always be <h1> and styled as necessary, then
    ><h2> for the subheadings under <h1>, etc... Or, do you start with the closes
    >matching <h> tag and style only what needs to be changed?
    >
    >Also, does it matter if there are unrelated areas on the page using
    >headings? (for example, a menu area with a main heading followed by category
    >subheadings and then another area on the page with a results heading
    >followed by sections with headings.)
    >
    >
     
    John Brandt, Oct 11, 2004
    #6
  7. On Mon, 11 Oct 2004 19:05:31 +0100, Toby Inkster
    <> wrote:

    >Noozer wrote:
    >
    >> Should the first heading tag always be <h1> and styled as necessary, then
    >> <h2> for the subheadings under <h1>, etc...

    >
    >Yes.


    <groping for counterexample> Perhaps when one is writing a page that
    is a continuation of a long article, then one might skip from <h1> to
    <h3> or lower. Although personally, I generally prefer that long
    articles are delivered to me as one page.

    Nick


    --
    Nick Theodorakis

    contact form:
    http://theodorakis.net/contact.html
     
    Nick Theodorakis, Oct 12, 2004
    #7
  8. Noozer

    Neal Guest

    On Tue, 12 Oct 2004 02:03:53 GMT, Nick Theodorakis
    <> wrote:

    > On Mon, 11 Oct 2004 19:05:31 +0100, Toby Inkster
    > <> wrote:
    >> Noozer wrote:
    >>> Should the first heading tag always be <h1> and styled as necessary,
    >>> then
    >>> <h2> for the subheadings under <h1>, etc...

    >> Yes.

    > <groping for counterexample> Perhaps when one is writing a page that
    > is a continuation of a long article, then one might skip from <h1> to
    > <h3> or lower.


    This presumes the article has been split at a non-major section, which is
    unwise. If the h2 section is ongoing, IMO h2 should be restated on the new
    page.
     
    Neal, Oct 12, 2004
    #8
  9. (Nick Theodorakis) wrote:

    >>> Should the first heading tag always be <h1> and styled as
    >>> necessary, then <h2> for the subheadings under <h1>, etc...

    >>
    >>Yes.

    >
    > <groping for counterexample> Perhaps when one is writing a page that
    > is a continuation of a long article, then one might skip from <h1> to
    > <h3> or lower.


    Maybe a more logical counterexample:

    <blockquote>
    <h1>Hello world</h1>
    <div title="content omitted from quotation">– –</div>
    <h3>Bla bla bla</h3>
    <p>Foo bar.</p>
    </blockquote>

    You would be quoting an external document, omitting some part thereof, so
    that only content relevant for the purpose of quoting is present.

    Browsers (or indexing robots or table of content generators or other
    software) should not be expected to cope with this well. But here the
    main problem is that they don't really understand <blockquote>.
    If <blockquote> really means block quotation, it should effectively open
    a new context, corresponding to embedding an external document.

    So in practical terms, we might be more or less forced to use illogical
    markup in such situations, e.g. deflating h1 to h4 and h3 to h6 for
    example, if the block quotation appears under a h3 heading.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
     
    Jukka K. Korpela, Oct 12, 2004
    #9
  10. Noozer

    Toby Inkster Guest

    Nick Theodorakis wrote:

    > <groping for counterexample> Perhaps when one is writing a page that
    > is a continuation of a long article, then one might skip from <h1> to
    > <h3> or lower.


    Page 1:
    <h1>The Foo Bar FAQ</h1>
    <h2>Foo</h2>
    <h3>What is Foo?</h3>
    <h3>Where is Foo?</h3>
    <h3>Why is Foo?</h3>

    Page 2:
    <h1>The Foo Bar FAQ (cont'd)</h1>
    <h2>Foo (cont'd)</h2>
    <h3>What has that got to do with Hong Kong Fooey?</h3>
    <h2>Bar</h2>
    <h2>Can you buy Foo in a Bar?</h2>
    <h2>In which Bars can you buy Foo?</h2>

    > Although personally, I generally prefer that long articles are
    > delivered to me as one page.


    Ditto, or that one is offered the choice -- depending I guess on the
    length of the document and how much I intend to read.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Oct 12, 2004
    #10
  11. Noozer

    Noozer Guest

    "Noozer" <> wrote in message
    news:gryad.711979$gE.681446@pd7tw3no...
    > Just wondering what the proper usage is for heading tags.
    >
    > Is it proper to start using <h3> if you haven't used an <h1> or <h2> tag?


    Thanks all!

    The replies made sense... I know it's not a BIG issue, but still worth
    considering.
     
    Noozer, Oct 12, 2004
    #11
  12. Noozer

    DU Guest

    Noozer wrote:
    > Just wondering what the proper usage is for heading tags.
    >
    > Is it proper to start using <h3> if you haven't used an <h1> or <h2> tag?


    No. And iso-HTML (iso 15445) requires that headings start with <h1>,
    that the document respects logical orders of headings otherwise this
    will be reported as validation errors.
    There are reasons for this. Assistive technologies rely on such order.
    Overall editorial conventions of printed documents (newspapers, books,
    magazines) follow such rules too.

    DU
    --
    The site said to use Internet Explorer 5 or better... so I switched to
    Mozilla 1.7.3 :)
     
    DU, Oct 13, 2004
    #12
  13. Noozer

    Kris Guest

    In article <>,
    Andy Dingley <> wrote:

    > >Just wondering what the proper usage is for heading tags.

    >
    > There is none. Zilch. Nada.


    There is. ISO HTML tells you you must start with H1 and not skip any
    levels. This is actually a real standard.

    --
    Kris
    <> (nl)
     
    Kris, Oct 16, 2004
    #13
  14. Noozer

    Neal Guest

    On Sat, 16 Oct 2004 13:14:25 +0200, Kris <>
    wrote:

    > In article <>,
    > Andy Dingley <> wrote:
    >
    >> >Just wondering what the proper usage is for heading tags.

    >>
    >> There is none. Zilch. Nada.

    >
    > There is. ISO HTML tells you you must start with H1 and not skip any
    > levels. This is actually a real standard.


    ... if you code to ISO. If you don't, it's irrelevent.
     
    Neal, Oct 16, 2004
    #14
  15. Noozer

    Andy Dingley Guest

    On Sat, 16 Oct 2004 13:14:25 +0200, Kris
    <> wrote:

    >There is. ISO HTML tells you you must start with H1 and not skip any
    >levels. This is actually a real standard.


    Yes, but it's an ISO standard and they smell.


    Our weapon is unswerving allegiance to the W3C !
     
    Andy Dingley, Oct 16, 2004
    #15
  16. Andy Dingley <> wrote:

    > On Sat, 16 Oct 2004 13:14:25 +0200, Kris
    > <> wrote:
    >
    >>There is. ISO HTML tells you you must start with H1 and not skip any
    >>levels. This is actually a real standard.

    >
    > Yes, but it's an ISO standard and they smell.
    >
    > Our weapon is unswerving allegiance to the W3C !


    .... and her mighty state of Xhysteria. And the W3C virtually ridicules
    structured use of headings as nitpicking:

    "Some people consider skipping heading levels to be bad practice. They
    accept H1 H2 H1 while they do not accept H1 H3 H1 since the heading level
    H2 is skipped."
    http://www.w3.org/TR/html4/struct/global.html#edef-H1

    As usual, the HTML 2.0 specification (oddly hosted by the W3C in a
    primitive hypertext format) is a great improvement over its successors:

    "The six heading elements, H1 through H6, denote section headings.
    Although the order and occurrence of headings is not constrained by the
    HTML DTD, documents should not skip levels (for example, from H1 to H3),
    as converting such documents to other representations is often
    problematic."
    http://www.w3.org/MarkUp/html-spec/html-spec_5.html#SEC5.4

    Note the lack of misleading babble about "importance" there.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
     
    Jukka K. Korpela, Oct 18, 2004
    #16
  17. Noozer

    Neal Guest

    On Mon, 18 Oct 2004 06:24:46 +0000 (UTC), Jukka K. Korpela
    <> wrote:

    > "Some people consider skipping heading levels to be bad practice. They
    > accept H1 H2 H1 while they do not accept H1 H3 H1 since the heading level
    > H2 is skipped."
    > http://www.w3.org/TR/html4/struct/global.html#edef-H1


    This is a set-off note to the section on headings, in fairness to the
    reader.
    > ...
    > "The six heading elements, H1 through H6, denote section headings.
    > Although the order and occurrence of headings is not constrained by the
    > HTML DTD, documents should not skip levels (for example, from H1 to H3),
    > as converting such documents to other representations is often
    > problematic."
    > http://www.w3.org/MarkUp/html-spec/html-spec_5.html#SEC5.4


    Actually, these together are very illustrative. I tend to try to see the
    HTML4 explanations with an eye for history, seeing them as written by, and
    for, people familiar with the earlier recommendations.

    > Note the lack of misleading babble about "importance" there.


    .... which we see in the 3.2 recommendation...

    "H1, H2, H3, H4, H5 and H6 are used for document headings. You always need
    the start and end tags. H1 elements are more important than H2 elements
    and so on, so that H6 elements define the least important level of
    headings."
    http://www.w3.org/TR/REC-html32#headings

    .... as well as in the 4.01 you quoted above.

    To me, this implies that headings were originally intended in terms of
    "level" - the H1 was the most encompassing heading on the page, H2 the
    next after, etc. Later, they got wishy-washy and allowed for the headings
    to be used out of typical term-paper order - as the original internet was
    mainly academic papers, it would make sense to follow academic procedures,
    but they are now nodding toward the more commercial aspects of the
    internet.

    Me, I prefer following a very strict ordering of headings. One H1 per
    page. The page is divided up into H2's, allowing for a prolog before the
    first H2. H2 sections can be similarly divided up into H3's.

    But, it would seem that, although this method is very usable and works
    well in any situation, the W3C have pandered to the average author who
    knows nothing of the history of the internet.

    I'd characterize that as sad, but is it? Perhaps not. Perhaps strict
    adherance to ordered headings is not a necessity of a good web page. Until
    I am convinced of that, though, I'll continue using strict ordering of my
    headings.
     
    Neal, Oct 18, 2004
    #17
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. metfan
    Replies:
    2
    Views:
    4,853
    Robert Olofsson
    Oct 21, 2003
  2. Colin J. Williams

    Webchecker Usage - a problem with local usage

    Colin J. Williams, Feb 25, 2004, in forum: Python
    Replies:
    1
    Views:
    541
    Colin J. Williams
    Feb 26, 2004
  3. hvt
    Replies:
    0
    Views:
    1,213
  4. hvt
    Replies:
    0
    Views:
    1,476
  5. Krist
    Replies:
    8
    Views:
    6,490
    Arne Vajhøj
    Feb 10, 2010
Loading...

Share This Page