Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

main

The <main> element is used as a container for all of the unique main content in the <body> element. Only one <main> element should reside in a document. It is not meant to wrap regions of the document that will be identical in other documents such as navigation menus, the masthead, the base footer or any other regions in the document that are identical across multiple documents.

Code Example

<body> <header> <nav> ... </nav> </header> <main> <h1>Cooking Healthy</h1> <article> <h2>My Article</h2> <p> ... </p> </article> <article> <h2>My Other Article</h2> <p> ... </p> </article> </main> <footer> ... </footer> </body>

Attributes

globals - the global attributes common to all elements possible values: see global attribute list

Official Documentation

http://www.w3.org/TR/html/grouping-content.html#the-main-element

HTML

Elements

aabbraddressareaasidearticleaudiobbasebdobdiblockquotebodybrbuttoncanvascaptioncitecodecolcolgroupdatadatalistdddeldetailsdfndialogdivdldtemembedfieldsetfigcaptionfigurefooterformh1 h2 h3 h4 h5 h6headheaderhrhtmliiframeimginputinskbdkeygenlabellegendlilinkmainmapmarkmetameternavnoscriptobjectoloptgroupoptionoutputpparampreprogressqrb rp rt rtc rubyssampscriptsectionselectsmallsourcespanstrongstylesub supsummarytabletbodytdtemplatetextareatfootththeadtimetitletrtrackuulvarvideowbr