In this case, regarding whether or not it is appropriate to have multiple ‘main’ elements, I’m wondering if Mr. Hickson has data to share that would substantiate the implicit claim that class="main" is more commonly found throughout the web than id="main". In HTML, span and div tags are elements used to define parts of a document, so that they are identifiable when a unique classification is necessary.Where other HTML elements such as p (paragraph), em (emphasis), and so on, accurately represent the semantics of the content, the additional use of span and div tags leads to better accessibility for readers and easier maintainability for authors. So while the use of main is restricted I don’t consider it “limits the use of main hugely” for the identified use cases it was designed for. As long as only consists of sections, articles, and asides? But now we have two. The tag is actually a new addition to the HTML5 specification. Division I schools have to sponsor at least six sports for men and eight sports for women. Also see the W3C WAI-ARIA1.0 spec for an example of multiple role=main’s in one page: role=main is currently allowed multiple times when in separate document and application regions, though this could change in ARIA.next. Where flow content is expected, but with no article, aside, footer, header or nav element ancestors. That’s just… ugly. According to W3C's HTML documentation: "A section is a thematic grouping of content, typically with a heading." 4. Depends on the browser vendor and which developer from the respective browser vendor. About what @manuel said about the structure: So the question I pose to you, not as a castigation, or a request to reconsider the role of (seriously, don't; it's where it should be) but more because I don't have the answers, nor the data to corroborate them, is "What could/should that element be, which happily sits, contextually as a direct child of an article/section/in-document aside , and sits as a sibling to header/footer, in the case where you wish to have several of these sub-documents, potentially in different contexts/configurations, in different widgets/components, all living together on the same page?". See more. From looking at publicly available data sets I am not seeing the markup patterns you describe being used for the purpose you describe. Thinking about the multiple main model, I wonder whether it blurs the line between section and main too much? @Steve Thanks for your effort with and I agree that it definitely serves a stronger purpose as an entrypoint for assistive tech, and overall document outline, than as a generic container within any element. Note that Classes are given a Roman numeral and Divisions an Arabic numeral. What about HTML5Shiv? HTML Element. Will Main join the http://html5doctor.com/html-5-reset-stylesheet/ :) ? The W3C Validator gives a warning message. That is what
is for. It's merely a styling hook (like a
with a new name) and represents its children. It functions as a slightly less competitive alternative to Division I that is not as driven by money. I do recall studying lots of randomly selected pages and finding that a huge number have multiple elements with classes or IDs like “main” or “content”, etc. What they have indicated when talking to them is that the utility of landmarks decreases as a function of the number, the more there are the less use they become. for the job. The main element should denote the main content of a document in distinction to the main header and the main footer of that document, not in distinction to what’s inside, because then it sort of is just a redundant wrapper for article (most of the time anyways – and I do get the difference between main and article). seems to support the notion of a single instance of main per page doesn’t it? @Karl I am doing some grepping of a new data set to look at use of class=main , here is what I based main on: In the process of developing the element spec I looked at Crap, it ate my brackets. @manuel You can do that, that’s exactly what the WHATWG spec’s definition of is intended for (replacing ). I saw in HTML 5.1 nightly build about the which only allowed once and must direct descendant of the body. Dude, if you’re going to spec features, please for the love of kittens provide use cases, data, and talk to real users and developers. “The WHATWG definition is just as accessible as Steve’s — more Ok, so the reason I am asking is that I have an external antenna (mag mount) from an older modem. What is the recommendation now? Now everything fell into place. body>article>{header, main,aside,footer}. Let’s get started. I actually have a page where I use multiple main elements in the DOM, but only one is displayed at a time. At first glance this looks like a viable approach. There are millions of pages using article header, aside, footer. You’ve missed the point: it’s still “programmatically obvious” where the principal content begins in this scenario even with multiple main elements, so this is not an argument for requiring only one main element per page. BUT, also inside main, I like to have my sidebar(s), because, in my eyes, they are also main content in the sense that they are not header/footer nor should they be the same level as header/main/footer. This pollution will totally scupper the effectiveness For my use case it’s an easy way to switch between various language versions of my page: there’s a body element with two div Elements inside of it. Main article: N.Y.C. I’ve been lead to believe that often it’s wise to use when the main piece of content is something that can be displayed on it’s own, in isolation. Interesting… Maybe the main element should get a revisit like the aside, which can now peacefully act as a sidebar element? Establishing it's id will allow us to reference it in other places. data from a number of sources [3] on frequency of usage of id values to Does it make sense to put a main element within a main element? It only takes a few minutes, so now really is the time to start adding it to the sites you're developing. Best Answer. The main differences between Catholics and Protestants Five hundred years after the Reformation, there are still painful divisions between Protestants and Catholics. The main element represents the main content of the body of a document or application. Google Trends Python 2 vs. Python 3. I think it’s actually an idea that looks better than in theory than it’s likely to be in practice though. A lot of the specification work on main stream implementation of features is carried out by Ian via the WHATWG. Are browser vendors picking their ‘favourite’, or is it more of a personal battle thing? does it support (create element) for element? HTML already supported all the uses cases of role=main, better than role=main does. – main Feel free to change, reuse modify and extend it. –/div.content Another side project is Speak the Web, a series of small gig style web conferences. It’s a proposal that has been rejected, it only lives on in the whatwg spec because hixie decides what’s in his spec. Example of a div tag with a maximum width of 200 pixels and a silver background. Although I won’t go into detail, the discussion is an interesting read. If anyone else has any feedback on the WHATWG spec, please don’t hesitate to send it in at http://whatwg.org/html or e-mail me directly at ian@hixie.ch or post to the WHATWG list: http://whatwg.org/mailing-list. The main element is implemented along with its semantics (role=main) in all major browsers except IE (IE is the reason why it is still suggested to ad explicit role=main), so it is here to stay. – footer. With a few workarounds for older IE, it is practical to use this more efficient way of doing visual layout. The chaos of the virus began wit… From reviewing the use of id=main (and the like) in thousands of pages I did not see the pattern you describe. I guess I am just looking for a more solid assurance that it is okay to use id and class selectors on a section tag as long as the section tag is being properly used. but that’s too confusing. Because isn’t sectioning content, it doesn’t affect the document outline in the same way ,