html标签

1、pre 元素可定义预格式化的文本。被包围在 pre 元素中的文本通常会保留空格和换行符。而文本也会呈现为等宽字体。

  :当把其他标签(比如 <a> 标签)放到 <pre> 块中时,就像放在 HTML/XHTML 文档的其他部分中一样即可。

<pre>
<html>

<head>
  <script type="text/javascript" src="loadxmldoc.js">
</script>
</head>

<body>

  <script type="text/javascript">
    xmlDoc=<a href="dom_loadxmldoc.asp">loadXMLDoc</a>("books.xml");
    document.write("xmlDoc is loaded, ready for use");
  </script>

</body>

</html>
</pre>
<pre>
  山重水复疑无路
    柳暗花明又一村
</pre>

效果:

 <html>

<head>
  <script type="text/javascript" src="loadxmldoc.js">
</script>
</head>

<body>

  <script type="text/javascript">
    xmlDoc=loadXMLDoc("books.xml");
    document.write("xmlDoc is loaded, ready for use");
  </script>
  </body> </html>
  山重水复疑无路
    柳暗花明又一村

2、blockquote:换行并缩进

here is a long quotation here is a long quotation
<blockquote>
here is a long quotation here is a long quotation
</blockquote>

  请注意,浏览器在 blockquote 元素前后添加了换行,并增加了外边距。

效果:

3、<hr>分隔线

4、段落标题<h1>....<h6>

5、<font>:字体样式

   <b>:粗体

   <i>:斜体

     <u>:下划线

   <sub>:设置下标,如:SO4

   <sup>:设置上标,如:SO42+

posted @ 2017-03-28 17:12  瘋孑  阅读(171)  评论(0)    收藏  举报