<!DOCTYPE html>
声明。<html>
标签,并设置lang
属性为英语。<head>
标签,其中包含<meta charset="UTF-8">
和一个自定义的页面标题。<body>
标签,其中包含一个标题标签 <h1>
和一个段落标签 <p>
。<img>
标签。
6.创建一个简单的表单:
助手
以下是试题的答案示例:
htmlCopy code<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My First HTML Page</title>
</head>
<body>
<h1>Welcome to My Page</h1>
<p>This is a simple HTML page.</p>
</body>
</html>
htmlCopy code<!-- 无序列表 -->
<ul>
<li>Hiking</li>
<li>Reading</li>
<li>Coding</li>
</ul>
<!-- 有序列表 -->
<ol>
<li>Math</li>
<li>History</li>
<li>Science</li>
</ol>
htmlCopy code<table border="1">
<thead>
<tr>
<th>Name</th>
<th>Age</th>
<th>City</th>
</tr>
</thead>
<tbody>
<tr>
<td>Your Name</td>
<td>Your Age</td>
<td>Your City</td>
</tr>
<tr>
<td>Fictional Person</td>
<td>30</td>
<td>Fictional City</td>
</tr>
</tbody>
</table>
htmlCopy code<a href="https://www.example.com">Example Website</a>
htmlCopy code<img src="image.jpg" alt="Description of the image">
htmlCopy code<form>
<label for="username">Username:</label>
<input type="text" id="username" name="username" required><br><br>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required><br><br>
<input type="submit" value="Submit">
</form>
htmlCopy code<!-- This is a simple HTML document -->
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Metadata for character set and title -->
<meta charset="UTF-8">
<title>My First HTML Page</title>
</head>
<body>
<!-- Main content -->
<h1>Welcome to My Page</h1>
<p>This is a simple HTML page.</p>
<!-- Lists, tables, links, images, and form -->
<ul>
<!-- Unordered list -->
<li>Hiking</li>
<li>Reading</li>
<li>Coding</li>
</ul>
<!-- ... -->
</body>
</html>
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。