html-inspector icon indicating copy to clipboard operation
html-inspector copied to clipboard

The <main> element can now appear more than once per page.

Open philipwalton opened this issue 11 years ago • 3 comments

http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-main-element

philipwalton avatar Sep 04 '14 23:09 philipwalton

Great tool, Philip!

FYI, this is only true if you accept the WHATWG's version of the spec The W3C's still says that main should only be included once:

Authors must not include more than one main element in a document.

And:

Authors must not include the main element as a descendant of an article, aside, footer, header or nav element.

source

impressivewebs avatar Dec 23 '14 06:12 impressivewebs

Well, what does html-inspector aim for? W3C validation success or markup correctness? If the WHATWG spec says it's OK, it's OK in my book.

jonkessler avatar Feb 02 '15 17:02 jonkessler

I don't see it as being about validation success vs. markup correctness. I see it as about being consistent. HTML Inspector needs to either pick the W3C version or the WHATWG version of the spec and stick to it.

From looking at my current source, it seems like I picked the W3C version (probably by accident) without giving much thought to the choice between the two. Moving forward I should pick one and stick to it. WRT the <main> element, I don't think it makes sense to change this rule without changing the whole validation module.

Any thoughts? Recommendations?

philipwalton avatar Feb 03 '15 20:02 philipwalton