Home > Web Front-end > H5 Tutorial > HTML5 semantics - main

HTML5 semantics - main

黄舟
Release: 2017-02-07 13:56:58
Original
1634 people have browsed it

As early as 2013, the

element was officially added to the W3C HTML specification. Up to now, the definition of this element has been very complete, so now it is time to take a deeper look at when it is appropriate to use

 W3C specification

 The main purpose of

is to map ARIA’s landmark function main to elements in HTML. This helps screen readers and assistive devices know where the main content of the page begins. The W3C specification describes
as:

The main content of a document or application. The main content area consists of content that directly relates to or extends to the central topic of the document or the core functionality of the app.

Since the

element was included in the HTML specification, the element has reverted to its definition in HTML4.

The body element represents the content of the document.

Details

One thing to note about using the

element is that it can only be used in each page once. Why should we stipulate that a page can only be used once? Although I'm not interested in the specific details, some of the points seem to make sense.

According to the specification, if you try to use multiple

tags in a document, the W3C validator will throw an error.

Another requirement for the

element is that it cannot be used as a child element node of
,
,
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template