24

In what scenarios do you use <section> tag of html 5, in place of <div>?

Jitendra Vyas
  • 148,487
  • 229
  • 573
  • 852

2 Answers2

19

Examples of sections would be chapters, the various tabbed pages in a tabbed dialog box, or the numbered sections of a thesis. A Web site's home page could be split into sections for an introduction, news items, and contact information

The section element represents a generic document or application section…The section element is not a generic container element. When an element is needed for styling purposes or as a convenience for scripting, authors are encouraged to use the div element instead.

Source.

Further Reading.

Also see When to use the section element.

Community
  • 1
  • 1
alex
  • 479,566
  • 201
  • 878
  • 984
  • I forgot but I read somewhere that if we use
    then `
    ` should have `
    ` and `
    ` inside. and I'm also confused between `article` and `section`
    – Jitendra Vyas May 20 '11 at 01:57
6

From the specs

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.

Do's and Dont's (s) for < section > tag

Saurabh Gokhale
  • 53,625
  • 36
  • 139
  • 164