main element is a container for the central topics of a document or section. This central content may be interpreted as all that's left after you remove ads, headers (
header), footers (
footer), navigational sections (
nav), related links and other such secondary elements.
This example shows a typical document structure where the
main element wraps the essential contents.
<html> <head> <title>Article: Free software</title> </head> <body> <header> <p>Welcome to CrazyArticles!</p> <nav> <a href="/">Home</a> <a href="/articles.html">Articles</a> <a href="/contactus.php">Contact us</a> </nav> </header> <main> <h1>Free software</h1> <p>Free software, software libre, or libre software is computer software that gives users the freedom to run the software for any purpose as well as to study, modify, and distribute the original software and the adapted versions.</p> <p>...</p> </main> <footer> <p>© All rights reserved</p> </footer> </body> </html>
For information about global attributes refer to this list of global attributes in HTML5.
For information about global events refer to this list of global events in HTML5.