SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jul 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Newb question about the use of h1-h6 tags

    As I understand it, HTML5 contains sectional tags like section, article, nav, etc

    I understand that the most important headings should have h1 tags wrapped around them and as the headings descend in the importance, we ascend upwards in the heading tags.

    HTML Code:
    <h1>Most important</h1>
    <h2>Less Important</h2>
    </h6>Least Important</h6>
    Is this document wide or only within sections? In other words, do is the following appropriate?

    HTML Code:
    <section>
    <h1>Most Important</h1>
    <h2>Less Important</h2>
    <section>
    <h1>Less important</h1>
    </section>
    </section>
    Or should it be

    HTML Code:
    <section>
    <h1>Most Important</h1>
    <h2>Less Important</h2>
    <section>
    <h3>Less Important</h3>
    </section>
    </section>

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,789
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    It iks document wide in HTML 4.

    It is proposed that it apply within sections in HTML 5.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,273
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    And regarding how HTML5 uses heading tags, I would keep using the HTML4 setup (one main h1 heading per document, followed by a non-skipping set of lower tags as needed) until browsers and AT have caught up to the new Document Outline model. Currently, screen reader users and Opera keyboarders use heading tags as an important part of site navigation so the "make everything an h1" is currently a problem.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •