<!DOCTYPE html> <!-- 文档类型声明 -->
<html> <!-- HTML文档的根元素 -->
<head> <!-- 文档头部 -->
<title>Page Title</title> <!-- 网页标题 -->
<meta charset="UTF-8"> <!-- 字符编码 -->
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- 网页视口 -->
<link rel="stylesheet" href="style.css"> <!-- 引入CSS样式表 -->
</head>
<body> <!-- 文档主体 -->
<h1>Heading 1</h1> <!-- 标题 -->
<p>Paragraph</p> <!-- 段落 -->
<img src="image.png" alt="Image"> <!-- 图片 -->
<a href="https://www.example.com">Link</a> <!-- 链接 -->
<ul> <!-- 无序列表 -->
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
<ol> <!-- 有序列表 -->
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ol>
<table> <!-- 表格 -->
<tr>
<th>Header 1</th>
<th>Header 2</th>
</tr>
<tr>
<td>Data 1</td>
<td>Data 2</td>
</tr>
</table>
<form action="/submit" method="post"> <!-- 表单 -->
<label for="input">Input:</label>
<input type="text" id="input" name="input">
<button type="submit">Submit</button>
</form>
<script src="script.js"></script> <!-- 引入JavaScript脚本 -->
</body>
</html>
html示例代码
最新推荐文章于 2023-12-18 10:45:46 发布