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

html简单网页成品

作者:残情弑天   发布日期:2025-02-15   浏览:111

<!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;
            text-align: center;
        }
        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="#services">服务</a>
        <a href="#contact">联系我们</a>
    </nav>
    <section>
        <h2>这是一个简单的网页成品示例</h2>
        <p>这个网页包含了基本的HTML结构和一些CSS样式,展示了如何创建一个简单的响应式网页。</p>
    </section>
    <footer>
        <p>&copy; 2023 简单网页成品</p>
    </footer>
</body>
</html>

解释说明:

  1. DOCTYPE声明<!DOCTYPE html> 声明文档类型为HTML5。
  2. HTML标签<html> 标签是HTML文档的根元素,lang="zh-CN" 表示页面语言为简体中文。
  3. 头部信息<head> 包含了元数据(如字符集、视口设置)和页面标题。
  4. 样式部分:使用内联CSS定义了页面的样式,包括字体、背景颜色、导航栏样式等。
  5. 主体内容<body> 包含了页面的主要内容,分为头部 (<header>)、导航栏 (<nav>)、主要内容区域 (<section>) 和页脚 (<footer>)。
  6. 响应式设计:通过 meta viewport 设置使页面在移动设备上也能良好显示。

上一篇:markdown 转html

下一篇:html在线生成

大家都在看

静态html源码

ios打开html

colspan在html中是什么意思

xml转html

html时间代码

html2canvas使用

html标题标签是什么

html 换行符号

html中b标签的作用

html美化代码

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

Laravel 中文站