treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] div id="page-wrap" should be section on HTML5?

  • Hi !,

    What do you think?,

    How we should use the typical
    <div id="page-wrap">
    in HTML5?

    it should be a section?, like
    <section id="page-wrap">...</section>


    Post your comments.
  • Pardon? Could you please re-phrase?
  • And now?,
  • Hmmm. I'm not 100% sure, but I use div since it isn't necessarily a 'section'.
  • You cann't say it without more information.

    The main difference between a <div> or a <section> tag is that the section had a semantic meaning and the div tag not. So if the #page-wrap is only a container with nothing special you should use the div tag, but if it's important for the code (for instance this content #page-wrap) you should use the section tag.

    A nice link: http://html5doctor.com/avoiding-common-html5-mistakes/
  • I´m not sure about it. This is what w3c say about section:

    "The section element represents a generic section of a document or application. A section, in this context, is a thematic grouping of content, typically with a heading".
  • Why I´m asking this is because w3c strongly recommend use elements instead of a div so I think if we use so much things like "page-wrap" it should be a element for that.
  • Thanks Wouter!,
    I will take the div tag option.