Main tag_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:47:50
Original
1557 people have browsed it

main

The

main tag specifies the main content of the document. The content in the
main element should be unique to 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: More than one main element cannot appear in a document. The main element cannot be a descendant of: article, aside, footer, header, or nav.

<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8" /><title>Using main</title></head><body><header>My page</header><nav>	[url=#]Home[/url]</nav><main>	<article>		<h1>My article</h1>		Content	</article>	<aside>		More information	</aside></main><footer>Copyright 2013</footer></body></html>
Copy after login

Another example:

<h1>Skateboards</h1>  The skateboard is the way cool kids get around  <article>  <h2>Longboards</h2>  Longboards are a type of skateboard with a longer   wheelbase and larger, softer wheels.  ...   ...   </article>  <article>  <h2>Electric Skateboards</h2>  These no longer require the propelling of the skateboard  by means of the feet; rather an electric motor propels the board,   fed by an electric battery.  ...   ...   </article>  </main>  <!-- other content -->  
Copy after login

The main tag is newly added in HTML 5

the main element

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