HTML5: the <main> element
Looks like we might see the <main>
element become a part of HTML5 some time later.
A working draft of the W3C specification was published a few days ago. Note that the document states: "It is inappropriate to cite this document as other than work in progress."
The idea behind the element is to use it to mark the main (who would have thought) content section of a page.
No more <section id="main"></section>
!
Usage
<body>
<header></header>
<nav></nav>
<main role="main">
...
</main>
<footer></footer>
</body>
Notes
- It is advised to add
role="main"
to the tag for time being. - There can be only one
main
element on a page. - It cannot be placed inside of an
article, aside, footer, header
ornav
element. - It is not sectioning content, thus it won't have any effect on the page outline.
- The specification is subject to change without notice, so keep an eye on it!
I, for one, would like to give an Internet hug to <main>
. Having header
, nav
and footer
but no special tag for the main section seriously bugged me. Come here, you!
You're the 9528th person to read this article.