常见的HTML文本格式化标签

html中常用的文本格式化标签:

<em> 定义着重文字
<i> 定义斜体字
<small> 定义小号字
<strong> 定义加重语气
<sub> 定义下标字
<sup> 定义上标字
<ins> 定义插入字
<del> 定义删除字
代码示例:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>HTML文本格式标签</title>
</head>
<body>
	<p>这是一个普通的文本- <b>这是一个加粗文本</b>。</p>
	<p><em>强调文本</em></p>
	<p>He named his car <i>The lightning</i>, because it was very fast.</p>
	<p><small> Copyright 1999-2050 by Refsnes Data.</small></p>
	<p><strong>加粗文本</strong></p>
	<p>这个文本包含 <sub>下标</sub>文本。</p>
	<p>这个文本包含 <sup>上标</sup> 文本。</p>
	<p>My favorite color is <del>blue</del> <ins>red</ins>!</p>
	<p>My favorite color is <del>blue</del> <ins>red</ins>!</p>
</body>
</html>

运行效果:


猜你喜欢

转载自blog.csdn.net/weixin_39036700/article/details/80529363