0

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?

henrywright
  • 10,070
  • 23
  • 89
  • 150
  • Perhaps reading this page might clear a few things up: http://html5doctor.com/the-main-element/ – blurfus Apr 21 '17 at 00:05
  • Thanks, I can see very subtle differences such as `
    ` can be used only once in a document.
    – henrywright Apr 21 '17 at 09:11
  • Yes, that's an important one but also it cannot be a descendant of `
    ` (among others) - In other words, `
    ` will always be a parent of `
    `
    – blurfus Apr 21 '17 at 19:27

1 Answers1

0

According to this article: http://html5doctor.com/the-main-element/

There are two principal distinctions:

  1. <main> can only be used once per document (DOM)
  2. <main> cannot be a descendant of <article>, <aside>, <footer>, <header>, or <nav> elements

This 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)

blurfus
  • 13,485
  • 8
  • 55
  • 61