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

index html

作者:视同仁寤戬   发布日期:2026-05-05   浏览:117

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Index Page</title>
</head>
<body>
    <header>
        <h1>Welcome to My Website</h1>
        <nav>
            <ul>
                <li><a href="#home">Home</a></li>
                <li><a href="#about">About</a></li>
                <li><a href="#services">Services</a></li>
                <li><a href="#contact">Contact</a></li>
            </ul>
        </nav>
    </header>
    <main>
        <section id="home">
            <h2>Home</h2>
            <p>This is the home section of the website.</p>
        </section>
        <section id="about">
            <h2>About</h2>
            <p>This is the about section of the website.</p>
        </section>
        <section id="services">
            <h2>Services</h2>
            <p>This is the services section of the website.</p>
        </section>
        <section id="contact">
            <h2>Contact</h2>
            <p>This is the contact section of the website.</p>
        </section>
    </main>
    <footer>
        <p>&copy; 2023 My Website. All rights reserved.</p>
    </footer>
</body>
</html>

解释说明

  1. DOCTYPE声明: <!DOCTYPE html> 声明文档类型为HTML5。
  2. HTML标签: <html lang="en"> 定义整个文档的语言为英语。
  3. 头部信息:
    • <meta charset="UTF-8"> 设置字符编码为UTF-8,确保网页可以正确显示各种语言的字符。
    • <meta name="viewport" content="width=device-width, initial-scale=1.0"> 确保网页在移动设备上能够正确缩放和布局。
    • <title> 标签定义了浏览器标签中显示的标题。
  4. 主体结构:
    • <header> 包含页面的顶部内容,如标题和导航栏。
    • <nav> 定义了导航链接。
    • <main> 包含页面的主要内容,分为多个部分(<section>),每个部分有自己的标题和描述。
    • <footer> 包含页面底部的信息,如版权声明。

这个示例代码展示了一个基本的HTML页面结构,适合用作网站的首页。

上一篇:html下划线

下一篇:html5中validate

大家都在看

静态html源码

404 html

ios打开html

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

nginx访问不到html

html 符号

colspan在html中是什么意思

html iframe嵌套页面

怎么将网页另存为html

xml转html

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

Laravel 中文站