<!-- 404.html 示例代码 -->
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>404 - 页面未找到</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
color: #333;
text-align: center;
padding: 50px;
}
h1 {
font-size: 3em;
margin-bottom: 20px;
}
p {
font-size: 1.2em;
margin-bottom: 30px;
}
a {
text-decoration: none;
color: #007BFF;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<h1>404</h1>
<p>抱歉,您访问的页面不存在。</p>
<p><a href="/">返回首页</a></p>
</body>
</html>
<!DOCTYPE html> 声明、<html> 标签、<head> 和 <body> 部分。<head> 中定义了字符集 (UTF-8) 和视口设置 (viewport),以确保页面在移动设备上正确显示。标题 (<title>) 设置为 "404 - 页面未找到"。<style> 标签定义了一些简单的 CSS 样式,使页面居中显示,并设置了字体、背景颜色和链接样式。<body> 中,通过 <h1> 显示 "404" 错误码,通过 <p> 提示用户页面不存在,并提供一个返回首页的链接。上一篇:html语义化标签有哪些
下一篇:html 在线预览
Laravel PHP 深圳智简公司。版权所有©2023-2043 LaravelPHP 粤ICP备2021048745号-3
Laravel 中文站