html文章页
时间: 2023-07-20 20:05:27 浏览: 47
HTML文章页通常包含文章的标题、作者、日期、正文内容、图片、链接等元素。以下是一个简单的HTML文章页面示例:
```html
<!DOCTYPE html>
<html>
<head>
<title>这是文章标题</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
font-family: Arial, sans-serif;
line-height: 1.5;
margin: 0;
padding: 0;
}
h1 {
font-size: 2.5rem;
margin-bottom: 0.5rem;
}
.author {
font-size: 0.8rem;
color: #999;
margin-bottom: 1rem;
}
.date {
font-size: 0.8rem;
color: #999;
margin-bottom: 1rem;
}
img {
max-width: 100%;
height: auto;
margin-bottom: 1rem;
}
a {
color: #007bff;
text-decoration: none;
}
</style>
</head>
<body>
<header>
<h1>这是文章标题</h1>
<div class="author">作者:张三</div>
<div class="date">发布日期:2021年9月1日</div>
</header>
<main>
<p>这是文章正文内容,可以包含段落、字体加粗、斜体、下划线、超链接等。</p>
<p>可以插入图片:<img src="image.jpg" alt="图片描述"></p>
<p>可以加入超链接:<a href="http://www.example.com">链接文字</a></p>
</main>
</body>
</html>
```
这只是一个简单的示例,实际上HTML文章页可以根据需求添加更多元素和样式。
相关推荐
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)