I was stumbling about the MDN documents and saw that they said it was ok to use the main tag in article elements, while W3 says it should not be a decedent at all within the article element.
MDN:
You can use multiple
<main>
elements within the same page when it makes sense to do so. For instance, if you have a page presenting multiple articles (each inside an<article>
element,
W3:
Note: There must not be more than one
<main>
element in a document. The<main>
element must NOT be a descendant of an<article>
,<aside>
,<footer>
,<header>
, or<nav>
element.
I want others to help me confirm if this is right and if so how can I contact MDN about this? I looked at their github and there is no place to report issues, or the contact us page is just about firefox, legalities of using the logo, or donating. Which is the right channel for the documentation support?
Yes, every html page should/could have the main tag. You must think this tag, as a container to show the main information.
Definition and UsageThe <main> tag specifies the main content of a document. The content inside the <main> element should be unique to the document. It should not contain any content that is repeated across documents such as sidebars, navigation links, copyright information, site logos, and search forms.
<main> The <main> HTML element represents the dominant content of the <body> of a document. The main content area consists of content that is directly related to or expands upon the central topic of a document, or the central functionality of an application.
In the top infobox on the MDN page:
Permitted parents: Any element that accepts flow content (WHATWG). However, the W3C specification doesn't allow
<main>
to be used as a descendent of<article>
,<aside>
,<footer>
,<header>
, or<nav>
.
Basically, the W3C and WHATWG specifications disagree. Typically, the WHATWG spec is what browsers follow, though there isn't much reason to place a <main>
as a descendent of one of the others listed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With