2008-04-22
HTML 文本格式化实例
关键字: html
文本格式化
b,strong标签粗体,br换行,big字体变大,em,i斜体,small字体变小,sub向下靠子字符串,sup向上靠子字符串
预格式文本
pre标签对空行和空格敏感
“计算机输出”标签
地址
缩写和首字母缩写
文字方向
块引用
删除字效果和插入字效果
b,strong标签粗体,br换行,big字体变大,em,i斜体,small字体变小,sub向下靠子字符串,sup向上靠子字符串
<html> <body> <b>This text is bold</b> <br> <strong>This text is strong</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> <br> This text contains <sub>subscript</sub> <br> This text contains <sup>superscript</sup> </body> </html>
预格式文本
pre标签对空行和空格敏感
<html>
<body>
<pre>
This is
preformatted text.
It preserves both spaces
and line breaks.
</pre>
<p>The pre tag is good for displaying computer code:</p>
<pre>
for i = 1 to 10
print i
next i
</pre>
</body>
</html>
“计算机输出”标签
<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> <p> <b>Note:</b> These tags are often used to display computer/programming code. </p> </body> </html>
地址
<html> <body> <address> Donald Duck<br> BOX 555<br> Disneyland<br> USA </address> </body> </html>
缩写和首字母缩写
<html> <body> <abbr title="United Nations">UN</abbr> <br> <acronym title="World Wide Web">WWW</acronym> <p>The title attribute is used to show the spelled-out version when holding the mouse pointer over the acronym or abbreviation.</p> <p>This only works for the acronym element in IE 5.</p> <p>This works for both the abbr and acronym element in Netscape 6.2.</p> </body> </html>
文字方向
<html> <body> <p> If your browser supports bi-directional override (bdo), the next line will be written from the right to the left (rtl): </p> <bdo dir="rtl"> Here is some Hebrew text </bdo> </body> </html>
块引用
<html> <body> Here comes a long quotation: <blockquote> This is a long quotation. This is a long quotation. This is a long quotation. This is a long quotation. This is a long quotation. </blockquote> Here comes a short quotation: <q> This is a short quotation </q> <p> With the block quote element, the browser inserts line breaks and margins, but the q element does not render as anything special. </p> </body> </html>
删除字效果和插入字效果
<html> <body> <p> a dozen is <del>twenty</del> <ins>twelve</ins> pieces </p> <p> Most browsers will overstrike deleted text and underline inserted text. </p> <p> Some older browsers will display deleted or inserted text as plain text. </p> </body> </html>
发表评论
- 浏览: 3757 次
- 性别:

- 来自: 深圳

- 详细资料
搜索本博客
最近加入圈子
最新评论
-
Rails2之Depot
用上了restful的scaffold最好把admin换成名字空间,下面做pro ...
-- by neodoxy -
Rails2之Depot
要是可以用radrails 来展示就更好了...
-- by antony_jiang -
听说Rails 2.1有个Time Z ...
楼主用的竟然是Mac
-- by Dreamer -
听说Rails 2.1有个Time Z ...
在2.0版本中就已经有了;
-- by PBFox -
听说Rails 2.1有个Time Z ...
确实之前就有了,不过Rails 2.10是Built-in的 多了一些新特性, ...
-- by t0uch






评论排行榜