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

个人网页制作html代码

作者:风外听竹   发布日期:2025-11-03   浏览:37

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>个人网页</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f4f4f4;
        }
        header {
            background-color: #4CAF50;
            color: white;
            padding: 10px 0;
            text-align: center;
        }
        nav {
            display: flex;
            justify-content: center;
            background-color: #333;
        }
        nav a {
            color: white;
            padding: 14px 20px;
            text-decoration: none;
            text-align: center;
        }
        nav a:hover {
            background-color: #ddd;
            color: black;
        }
        section {
            padding: 20px;
            margin: 20px;
            background-color: white;
        }
        footer {
            background-color: #333;
            color: white;
            text-align: center;
            padding: 10px 0;
            position: fixed;
            bottom: 0;
            width: 100%;
        }
    </style>
</head>
<body>
    <header>
        <h1>欢迎来到我的个人网页</h1>
    </header>
    <nav>
        <a href="#home">首页</a>
        <a href="#about">关于我</a>
        <a href="#contact">联系我</a>
    </nav>
    <section id="home">
        <h2>首页</h2>
        <p>这是我的个人网页的首页。</p>
    </section>
    <section id="about">
        <h2>关于我</h2>
        <p>这里是一些关于我的信息。</p>
    </section>
    <section id="contact">
        <h2>联系我</h2>
        <p>如果您有任何问题,可以通过以下方式联系我。</p>
    </section>
    <footer>
        <p>&copy; 2023 我的名字</p>
    </footer>
</body>
</html>

解释说明:

  1. 文档类型声明 (<!DOCTYPE html>):定义文档为 HTML5 标准。
  2. <html> 标签:根元素,指定语言为中文 (lang="zh-CN").
  3. <head> 部分
    • <meta charset="UTF-8">:设置字符编码为 UTF-8。
    • <meta name="viewport" content="width=device-width, initial-scale=1.0">:确保页面在移动设备上正确缩放。
    • <title>:设置网页标题。
    • <style>:内联 CSS 样式,用于美化页面。
  4. <body> 部分
    • <header>:包含网页标题和欢迎信息。
    • <nav>:导航栏,包含链接到不同部分的按钮。
    • <section>:不同的内容区域(如首页、关于我、联系我)。
    • <footer>:页脚,包含版权信息。

这个简单的 HTML 模板可以帮助你快速创建一个基础的个人网页。你可以根据需要进一步修改和扩展。

上一篇:html input type

下一篇:html样式

大家都在看

静态html源码

404 html

ios打开html

nginx访问不到html

html 符号

colspan在html中是什么意思

xml转html

html时间代码

html2canvas使用

html标题标签是什么

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

Laravel 中文站