Laravel  
laravel
文档
数据库
架构
入门
php技术
    
Laravelphp
laravel / php / java / vue / mysql / linux / python / javascript / html / css / c++ / c#

html main

作者:鱼宝宝睡觉觉   发布日期:2026-07-05   浏览:85

<!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>&lt;main&gt;</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>&copy; 2023 Your Company Name. All rights reserved.</p>
    </footer>
</body>
</html>

解释说明:

  • <main> 标签用于定义文档或应用程序的主内容区域。它应该包含与页面主题直接相关的内容。
  • 每个页面只能有一个 <main> 元素,并且该元素不应包含在其他主要内容信息(如 <article><aside><footer><header><nav>)中。
  • 在上面的例子中,<main> 包含了两个部分:一个是主页欢迎信息,另一个是关于公司的信息。这两个部分都是页面的核心内容。

上一篇:html 文本框

下一篇:html工具

大家都在看

静态html源码

404 html

ios打开html

用于定义html文档所要显示内容的是

html创建表格

nginx访问不到html

html 符号

colspan在html中是什么意思

html iframe嵌套页面

怎么将网页另存为html

Laravel PHP 深圳智简公司。版权所有©2023-2043 LaravelPHP 粤ICP备2021048745号-3

Laravel 中文站