Search code examples
htmlsemantic-markup

Section as main section


Is that semanticlly correct to use section element as main content section of a page?



Solution

  • Broadly, no.

    HTML5Doctor says:

    What we’ve been doing wrong is using section to wrap content in order to style it, or to demarcate the main content area from the nav, header, footer etc. These are jobs for div, not section.

    Since that article was written, the <main> element has been invented, for your exact use case.