What does main mean in html5

WBOY
Release: 2022-09-05 16:28:54
Original
4572 people have browsed it

In HTML5, main means body; this tag is used to specify the main content of the document, and the content in the tag is unique in the document and should not contain content that appears repeatedly in the document, such as Sidebar, navigation bar, copyright information, site logo or search form, etc. This tag is newly added in HTML5.

What does main mean in html5

The operating environment of this tutorial: Windows 10 system, HTML5 version, Dell G3 computer.

What does main mean in html5

tag is used to specify the main content of the document.

The content in the

tag is unique in the document. It should not contain content that appears repeatedly throughout the document, such as sidebars, navigation bars, copyright information, site logos, or search forms.

Note that in a document, the

element is unique, so more than one
element cannot appear. The
element cannot be a descendant of
,

Example

Use the main tag to display the main part of the document:

<main>
  <h2>Web 浏览器</h2>
  <p>Google Chrome、Firefox 以及 Internet Explorer 是目前最流行的浏览器。</p>
  <article>
    <h2>Google Chrome 浏览器</h2>
    <p>Google Chrome 浏览器是由 Google 开发的一款免费的开源 web 浏览器,于 2008 年发布。</p>
  </article>
  <article>
    <h2>Internet Explorer 浏览器</h2>
    <p>Internet Explorer 浏览器由微软开发的一款免费的 web 浏览器,发布于 1995 年。</p>
  </article>
  <article>
    <h2>Mozilla Firefox 浏览器</h2>
    <p>Firefox 浏览器是一款来自 Mozilla 的免费开源 web 浏览器,发布于 2004 年。</p>
  </article>
</main>
Copy after login

What does main mean in html5

(Learning video sharing: css video tutorial , html video tutorial)

The above is the detailed content of What does main mean in html5. For more information, please follow other related articles on the PHP Chinese website!

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