<!DOCTYPE html>
<html lang="CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>文本格式化标签</title>
</head>
<body>
<strong>加粗</strong><!-- 强调语义 -->
<b>另一种加粗</b>
<em>斜体</em><!-- 强调语义 -->
<i>另一种斜体</i>
<u>下划线</u>
<ins>也是下划线</ins><!-- 强调语义 -->
<strike>删除线</strike>
<del>删除</del><!-- 强调语义 -->
<s>不推荐使用的删除线</s>
<code>计算机代码</code>
<pre>保留
格式</pre>
<blockquote>引用</blockquote>
<q>短语引用</q>
<abbr title="缩写内容">缩写(鼠标悬停于上方)</abbr>
<address>地址</address>
<cite>作品名称</cite>
<dfn>定义</dfn>
<ins>插入</ins>
<mark>标记</mark>
<small>小号字体</small>
<big>大号字体</big>
<kbd>键盘输入</kbd>
<var>变量</var>
<samp>计算机输出</samp>
<span>行内元素</span>
<div>块级元素</div>
<sup>上标</sup>
<sub>下标</sub>
<h1>标题1</h1>
<h2>标题2</h2>
<h3>标题3</h3>
<h4>标题4</h4>
<h5>标题5</h5>
<h6>标题6</h6>
<p>段落</p>
<hr />
分割线
<ul>
<li>列表项1</li>
<li>列表项2</li>
<li>列表项3</li>
</ul>
<ol>
<li>列表项1</li>
<li>列表项2</li>
<li>列表项3</li>
</ol>
<dl>
<dt>定义标题1</dt>
<dd>定义内容1</dd>
<dt>定义标题2</dt>
<dd>定义内容2</dd>
</dl>
<a href="https://www.baidu.com">超链接</a>
<a href="https://www.baidu.com" target="_blank">新窗口打开超链接</a>
<a href="#">空链接</a>
<a href="mailto:<2184711240@qq.com>">发送邮件</a>
<a href="mailto:2184711240@qq.com?subject=这里是邮件标题&body=这里是邮件内容">发送带主题和内容的邮件</a>
<a href="tel:1234567890">拨打电话</a>
<img src="https://www.wenzhimo.xyz/wp-content/uploads/2024/10/2566B02C88E0D556AAD62E5F9B131F17.jpg" alt="图片加载失败,请想象一个雨窗" title="雨窗" width="200" height="150" />
<!-- alt属性为图片的文字说明,在图片无法显示时显示,title属性为图片的标题,在鼠标悬停时显示,width和height属性为图片的宽度和高度(一般用CSS设置) -->
<audio src="http://www.wenzhimo.xyz/wp-content/uploads/2024/12/小瀬村晶-Summer-Ghost.mp3" controls="controls"> </audio>
<br />换行
<hr />
<table border="2" width="500" height="200" align="center" style="border-collapse:collapse;" >
<tr>
<th>姓名</th>
<th>数学</th>
<th>语文</th>
</tr>
<tr>
<td>张三</td>
<td>90</td>
<td>80</td>
</tr>
<tr>
<td>李四</td>
<td>85</td>
<td>90</td>
</tr>
<!-- 合并单元格 -->
<tr>
<td colspan="3" align="right">制表日期</td>
</tr>
</table>
<h2>表单</h2>
<form action="#" method="post" width="500" height="600" align="left" >
<label for="name">姓名:</label>
<input type = "text" id="name" name="name" required /><br />
<label >性别:</label>
<input type="radio" id="male" name="gender" value="male" checked>
<label for="male">男</label>
<input type="radio" id="female" name="gender" value="female" >
<label for="female">女</label><br />
<label for="career" required>职业:</label>
<select id="career" name="career">
<option value="">--请选择--</option>
<option value="teacher">教师</option>
<option value="doctor">学生</option>
<option value="engineer">工程师</option>
</select><br />
<label for ="faverite" required>喜好:</label>
<input type="checkbox" id="sport" name="faverite" value="sport">
<label for="sport">体育</label>
<input type="checkbox" id="reading" name="faverite" value="reading">
<label for="reading">阅读</label>
<input type="checkbox" id="music" name="faverite" value="music">
<label for="music">音乐</label><br />
<label for="password" required>密码:</label>
<input type="password" id="password" name="password" required /><br />
<label for="message" required>留言:</label>
<textarea id="message" name="message" required></textarea><br />
<input type="submit" value="提交" />
</form>
<h2>表单&表格混合</h2>
<form>
<table border="0" width="500" height="200" align="left">
<tr>
<th><label for="name">姓名:</label></th>
<td><input type = "text" id="name" name="name" required /></td>
</tr>
<tr>
<th><label >性别:</label></th>
<td><input type="radio" id="male" name="gender" value="male" checked>男<input type="radio" id="female" name="gender" value="female" >女</td>
</tr>
<tr>
<th><label for="career" required>职业:</label></th>
<td>
<select id="career" name="career">
<option value="">--请选择--</option>
<option value="teacher">教师</option>
<option value="doctor">学生</option>
<option value="engineer">工程师</option>
</select>
</td>
</tr>
<tr>
<th><label for ="faverite" required>喜好:</label></th>
<td><input type="checkbox" id="sport" name="faverite" value="sport">体育<input type="checkbox" id="reading" name="faverite" value="reading">阅读<input type="checkbox" id="music" name="faverite" value="music">音乐</td>
<tr>
<th><label for="password" required>密码:</label></th>
<td><input type="password" id="password" name="password" required /></td>
</tr>
<tr>
<th><label for="message" required>留言:</label></th>
<td><textarea id="message" name="message" required></textarea></td>
</tr>
<tr>
<td align="center" ><input type="reset" value="重置" /></td>
<td align="left" ><input type="submit" value="提交" /></td>
</tr>
</table>
</form>
<br />
<br />
<br />
<br />
</body>
</html>
计算机代码
保留 格式
引用
短语引用缩写(鼠标悬停于上方) 地址 作品名称 定义 插入 标记 小号字体 大号字体 键盘输入 变量 计算机输出 行内元素
块级元素
上标
下标
标题1
标题2
标题3
标题4
标题5
标题6
段落
分割线
- 列表项1
- 列表项2
- 列表项3
- 列表项1
- 列表项2
- 列表项3
- 定义标题1
- 定义内容1
- 定义标题2
- 定义内容2

换行
姓名 | 数学 | 语文 |
---|---|---|
张三 | 90 | 80 |
李四 | 85 | 90 |
制表日期 |
发表回复