HTML 文本格式化

文本格式化标签

 标签                           描述                                    
 <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>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值