New non-main structure elements in html5

In addition to the main structural elements of article, section, nav, aside, and time, html5 has also added some non-main structural elements that represent logical structure or additional information.

1. The header element

The header element is a structural element with guiding and navigational functions. It is usually used to place the title of the entire page or content block within the page, but it can also contain other content, such as data tables, search forms, or related logo images.

Second, the footer element

The footer element can act as a footer to its parent content block or to a root block. Footer usually includes footnote information of its related blocks, such as author, related reading links, and copyright information.

Code example before html5:

<div class="footer">
     <ul>
          <li>Copyright Information</li>
          <li>Sitemap</li>
          <li>Contact information</li>
     </ul>
</div>

After the advent of html5, this method is no longer used, but a more semantic footer element is used instead. Like the header element, a page can use multiple footer elements.

3. The address element (block-level element, italic by default)

The address element is used to present contact information in the document, including the document author or document maintainer's name, website link, email address, real address, phone number, etc.

Fourth, the main element

The main element represents the main content of the page, and the main content area refers to the content that is directly related or extended to the title of the webpage or the main function of the page in the application. This area should be the unique content of each web page, and cannot include the navigation bar, copyright information, website LOGO, public search form and other common content of the entire website. Only one main element can be placed inside each web page. The main element cannot be placed inside any article, aside, footer, header and nav elements.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325251909&siteId=291194637