main
Summary
Represents the main content of the body of a document or application.
Overview Table
Examples
The following example shows a basic usage of the <main>
element
<!DOCTYPE html> <html> <head> <title>Main element example</title> </head> <body> <header> <h1>The main element</h1> </header> <main> <h2>Some content on the main element</h2> <article> ... </artice> <section> ... </section> </main> <footer> Copyright 2013 Web Platform </footer> </body> </html>
Notes
It is advised to use ARIA
role="main"
attribute on the main element until browsers have implemented the element.There must not be more than one
<main>
element in a document, and it must not be a descendent of an<article>
,<aside>
,<footer>
,<header>
, or<nav>
element.