用HTML写一个好看的文档模板
时间: 2023-06-18 15:02:55 浏览: 52
好的,以下是一个简单的HTML文档模板示例:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>文档标题</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f5f5f5;
}
.header {
background-color: #008080;
color: #fff;
padding: 20px;
}
h1 {
margin: 0;
font-size: 36px;
font-weight: normal;
}
.content {
max-width: 800px;
margin: 20px auto;
padding: 20px;
background-color: #fff;
box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.1);
}
h2 {
font-size: 24px;
font-weight: normal;
}
p {
line-height: 1.5;
margin-bottom: 20px;
}
.footer {
background-color: #333;
color: #fff;
padding: 20px;
text-align: center;
}
a {
color: #fff;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<header class="header">
<h1>文档标题</h1>
</header>
<main class="content">
<h2>章节标题</h2>
<p>这里是文档内容。</p>
<h2>章节标题</h2>
<p>这里是文档内容。</p>
<h2>章节标题</h2>
<p>这里是文档内容。</p>
</main>
<footer class="footer">
<p>版权所有 © 2021 <a href="#">公司名称</a></p>
</footer>
</body>
</html>
```
你可以根据需要修改样式和内容来创建自己的文档模板。