<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML Main Example</title>
</head>
<body>
<header>
<h1>Website Header</h1>
<nav>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
</header>
<main>
<section id="home">
<h2>Welcome to Our Website</h2>
<p>This is the main content area of the page. The <code><main></code> element is used to define the main content of a document or section. It should contain only content that is directly related to the central topic of the document.</p>
</section>
<section id="about">
<h2>About Us</h2>
<p>This section provides information about the company or organization. It is also part of the main content area.</p>
</section>
</main>
<footer>
<p>© 2023 Your Company Name. All rights reserved.</p>
</footer>
</body>
</html>
<main> 标签用于定义文档或应用程序的主内容区域。它应该包含与页面主题直接相关的内容。<main> 元素,并且该元素不应包含在其他主要内容信息(如 <article>、<aside>、<footer>、<header> 或 <nav>)中。<main> 包含了两个部分:一个是主页欢迎信息,另一个是关于公司的信息。这两个部分都是页面的核心内容。上一篇:html 文本框
下一篇:html工具
Laravel PHP 深圳智简公司。版权所有©2023-2043 LaravelPHP 粤ICP备2021048745号-3
Laravel 中文站