文本格式化标签
标签 | 描述 |
<b> | 定义粗体文本 |
<big> | 定义大号字 |
<em> | 定义着重文字 |
<i> | 定义斜体字 |
<small> | 定义小号字 |
<strong> | 定义加重语气 |
<sub> | 定义下标字 |
<sup> | 定义上标字 |
<ins> | 定义插入字(下划线) |
<del> | 定义删除字(删除线) |
<html>
<body>
<b>This text is bold </b>
<br />
<big>This text is big</big>
<br />
<em>This text is emphasized</em>
<br />
<i>This text is italic</i>
<br />
<small>This text is small</small>
<br />
<strong>This text is strong</strong>
<br />
<sub>This text is subscripted</sub>
<br />
<sup>This text is superscripted</sup>
<br />
<ins>This text is underlined</ins>
<br />
<del>This text is strikethrough</del>
<br />
</body>
</html>
“计算机输出”标签
标签 | 描述 |
<code> | 定义计算机代码 |
<kbd> | 定义键盘码 |
<samp> | 定义计算机代码样本 |
<tt> | 定义打字机代码 |
<var> | 定义变量 |
<pre> | 定义预格式文本(保留空格换行等) |
<html>
<body>
<code>Computer code</code>
<br />
<kbd>Keyboard input</kbd>
<br />
<tt>Teletype text</tt>
<br />
<samp>Sample text</samp>
<br />
<var>Computer variable</var>
<br />
<pre>
for i = 1 to 10
print i
next i
</pre>
</body>
</html>
这些标签常用于显示计算机/编程代码。
引用和术语定义
标签 | 描述 |
<abbr> | 定义缩写 |
<acronym> | 定义首字母缩写 |
<address> | 定义地址 |
<bdo> | 定义文字方向 |
<blockquote> | 定义长的引用(会插入换行和外边距离) |
<q> | 定义短的引用(加入引号) |
<cite> | 定义引用(标签通常表示它所包含的文本对某个参考文献的引用,比如书籍或者杂志的标题。) |
<dfn> | 定义一个定义项目(标记那些对特殊术语或短语的定义。) |
<html>
<body>
<abbr title="etcetera">etc.</abbr>
<br />
<acronym title="World Wide Web">WWW</acronym>
<br />
<address>
Written by <a href="mailto:webmaster@example.com">Donald Duck</a>.<br>
Visit us at:<br>
Example.com<br>
Box 564, Disneyland<br>
USA
</address>
<br />
<bdo dir="rtl">
Here is some Hebrew text
</bdo>
<br />
<blockquote>
here is a long quotation here is a long quotation here is a long quotation
here is a long quotation here is a long quotation here is a long quotation
here is a long quotation here is a long quotation here is a long quotation.
</blockquote>
<br />
<q>here is a short quotation here is a short quotation</q>
<br />
</body>
</html>