SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    May 2008
    Posts
    156
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HTML5: Section question

    Hi,
    Is possible to use:

    Code HTML4Strict:
    <section id="wrapper">
    </section>
    instead of ?:
    Code HTML4Strict:
    <div id="wrapper">
    </div>
    Is this the correct way in html5? I would appreciate any help! Thanks!

  2. #2
    SitePoint Addict joaquin_win's Avatar
    Join Date
    Jul 2005
    Location
    Venezuela
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi zoliky,

    The only problem of using <section> is, as always, IE6. Read this article http://www.sitepoint.com/article/html-5-snapshot-2009/ to see the details.

  3. #3
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,147
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    It could debated that the section element is/isn't appropriate.

    Against:

    When an element is needed for styling purposes or as a convenience for scripting
    -- A container div is normally intended to be a scripting convenience/ styling purposes.

    A general rule is that the section element is appropriate only if the element's contents would be listed explicitly in the document's outline.
    -- The container/root level div isn't normally important to the hierarchy of the document.

    For:

    generic document or application section
    -- Theoretically it could be considered the root level view/app section

    A section, in this context, is a thematic grouping of content, typically with a heading, possibly with a footer.
    -- It could be considered a thematic grouping of primary content/sections and normally includes some type of heading and footer.

    With that said, I believe the argument against is more solid and less subjective then for. So I vote for sticking to div if its absolutely needed. The primary purpose of a root level container is mostly presentational then anything else.

  4. #4
    SitePoint Zealot
    Join Date
    May 2008
    Posts
    156
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi
    I created an HTML menu:

    Code HTML4Strict:
    <ul>
       <li>Home</li>
       <li>Products</li>
       <li>Contact</li>
    </ul>

    In HTML5 I need to put the unordered list inside a "NAV" element? Even when I don't apply style rules for NAV ?

    For example:

    Code HTML4Strict:
    <nav>
    <ul>
       <li>Home</li>
       <li>Products</li>
       <li>Contact</li>
    </ul>
    </nav>

  5. #5
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You don't need to, but it might be helpful for users with a browser/AT combination that supports <nav> (though I'm not aware of any that support it yet). It might also be useful for search engines to be able to identify your navigation, however I don't know if any search engine that cares about <nav> yet.
    Simon Pieters


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
  •