My understanding is they both group content with <article>
being suitable for content that can be syndicated, and <main>
being suitable for content that is unique to a document. To me, they sound the same.
How do <main>
and <article>
elements differ?
According to this article: http://html5doctor.com/the-main-element/
There are two principal distinctions:
<main>
can only be used once per document (DOM
)<main>
cannot be a descendant of <article>
, <aside>
, <footer>
, <header>
, or <nav>
elementsThis means that <article>
can be a child element of <main>
(but not the other way around)
Semantically, this means that in one document (page) you will encounter a main
section of the content of the page with (hopefully) 1+ article
(s) within it. In other words, the main article for this page.
You could also find 1+ <aside>
section(s) with 1+ article
(s) within. Consider these other articles of interest on the page (but this is not the main content of the page)