首先是一个标准常规的HTML代码块。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>这是网页的标题</title>
</head>
<body>
<h1>这是一级标题</h1>
<p>这是一个段落</p>
</body>
</html>
记录下一些标签及其效果
<!-- 首字母缩写 当鼠标移到WWW上会显示title中所描述的内容 -->
<acronym title="World Wide Web">WWW</acronym>
<!-- 缩写 当鼠标移到etc.上会显示title中所描述的内容 -->
<abbr title="etcetera">etc.</abbr>
<!-- 文本格式化 -->
<b>这个文本是加粗的</b>
<strong>这个文本是加粗的</strong>
<big>这个文本字体放大</big>
<em>这个文本是斜体的</em>
<i>这个文本是斜体的</i>
<small>这个文本是缩小的</small>
<sub>下标</sub>
<sup>上标</sup>
<!-- 预格式文本 -->
<pre>
此例演示如何使用 pre 标签
对空行和 空格
进行控制
</pre>
<!-- 文字方向 默认是从左到右 -->
<p>该段落文字从左到右显示。</p>
<p><bdo dir="rtl">该段落文字从右到左显示。</bdo></p>
<!-- 块引用 -->
<p>WWF's goal is to:
<q>Build a future where people live in harmony with nature.</q>
We hope they succeed.</p>
<!-- 运行结果:WWF's goal is to: "Build a future where people live in harmony with nature." We hope they succeed. -->
<!-- 删除字效果和插入字效果 -->
<p>My favorite color is <del>blue</del> <ins>red</ins>!</p>
<!-- 运行结果:My favorite color is blue red! -->
<!-- 效果见下图 -->