HTML的探索5

2017-07-11  本文已影响0人  阿基米德的测试

HTML可定义很多供格式化输出的元素,比如粗体和斜体字。

HTML文本格式化实例

文本格式化

<html>

<body>

<br/>

<strong>This text is big</strong>

<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>

预格式文本

<html>

<body<

<pre>

这是

预格式文本。

它保留了    空格

<p>pre  标签很适合显示计算机代码:</p>

<pre>

for  i=1to10

      print   i

next  i

</pre>

</body>

</html>

“计算机输出”标签

<html>

<body>

<code>Cumputer code</code>

<br/>

<kbd>Keyboard input</kbd>

<br/>

<tt>Teletype text</tt>

<br/>

<samp>Sample text</samp>

<br/>

<var>Computer  variable</var>

<br/>

<p>

<b>注释:</b>这些标签常用于显示计算机/编程代码。</p>

</body>

</html>

地址

<!DOCTYPE html>

<html>

<body>

<address>

Written by <a href="mailto:webmaster@example.com">Donald Duck</a>.<br>

Vist us at:<br>

Example.com<br>

Box 564.Disneyland<br>

USA

</adress>

</body>

</html>

缩写和首字母缩写

<html>

<body>

<abbr title="etcetera">etc.</abbr>

</br>

<zcronym> title="Word Wide Web">WWW</acronym>

<p>在某些浏览器中,当您把鼠标移至缩略词语上时,title可用于展示表达的完整版本。</p>

<p>仅对于IE 5 中的acronym元素有效。</p>

<p>对于Nerscape6.2中的abbr和acronym元素都有效。</p>

</body>

</html>

上一篇 下一篇

猜你喜欢

热点阅读