maincontent
elementmaincontent
elementbody
element containing no other maincontent
elements.div
element that is the child of 0 or more div
elements that are children of a body
element containing no other maincontent
elements.HTMLElement
.maincontent
element represents the
main content section of the body
of a document or application. The main content section consists of content that is directly related to or expands upon the central topic of a document or central functionality of an application.
The main content section of a document should include content that is unique to that document and excludes content that is repeated across a set of documents such as site navigation links, copright information, site logos and banners and search forms (unless the document or applications main function is that of a search form).
In conforming documents, there is only one maincontent
element.
The maincontent
element formalises the common practice of identification of the main content section of a document using the id
values 'content' and 'main'. It also defines an HTML element that embodies the semantics and function of the WAI-ARIA landmark role=main
.
In the following example, we see 2 articles about apples (the main topic of a
Web page) the main topic content is identified by the use of the maincontent
element.
<!-- other content --> <maincontent> <h1>Apples</h1> <p>The apple is the pomaceous fruit of the apple tree.</p> <article> <h2>Red Delicious</h2> <p>These bright red apples are the most common found in many supermarkets.</p> </article> <article> <h2>Granny Smith</h2> <p>These juicy, green apples make a great filling for apple pies.</p> </article> </maincontent> <!-- other content -->
Here is a graduation programme the main topic content is defined by the use of the maincontent
element.
<!DOCTYPE html> <html> <head>
<title>Graduation Ceremony Summer 2022</title> </head> <body> <!-- other content --> <maincontent> <h1>Graduation</h1> <H2>Ceremony</H2> <p>Opening Procession</p> <p>Speech by Validactorian</p> <p>Speech by Class President</p> <p>Presentation of Diplomas</p> <p>Closing Speech by Headmaster</p> <h2>Graduates</h2>
<ul><li>Molly Carpenter</li> <li>Anastasia Luccio</li> <li>Ebenezar McCoy</li> <li>Karrin Murphy</li> <li>Thomas Raith</li> <li>Susan Rodriguez</li> </ul> </maincontent> <!-- other content --> </body> </html>
From publically reported studies [1] of id
values used in HTML content, the use of the strings "content" and "main" are common practice.
[1] http://triin.net/2006/06/12/CSS#figure-34, http://westciv.typepad.com/dog_or_higher/2005/11/real_world_sema.html