HTML语言剖析(六)清单标记 - HTML -

HTML语言剖析(六)清单标记

时间:2013-04-11 12:48:52   来源:   评论:加载中...   点击:加载中...
清单标记<OL> <LI>   <UL>   <MENU> <DIR>   <DL> <DT> <...

■ <UL> :
 
  <UL>称为无序清单标记。
  所谓无序清单就是在每一项前面加上 、、 等符号,故又称符号清单。
  <UL> 的参数设定(常用):
  例如: <UL type="square">

type="square"
  设定符号款式,其值有三种,如下,内定为 type="disc":
  符号  是当 type="disc" 时的列项符号。
  符号  是当 type="circle" 时的列项符号。
  符号  是当 type="square" 时的列项符号。

注意:由于 <UL> 及 <LI> 都有 type 这个参数,两者尽可能选用其一。

例子:

HTML Source Code (原始码) 浏览器显示结果
My Homepages:
<ul>
<li>Penpals Garden
<li>ICQ Garden
<li>Software City
<li>Creation of Webpage
</ul>
My Homepages:
  • Penpals Garden
  • ICQ Garden
  • Software City

■ <MENU> <DIR> :

这两个标记都不为 W3C 所赞同,希望用者能以 <ul> 及 <ol> 代之。
  <MENU> 及 <DIR>,基本上它和 <ul> 是一样的,在一些特别的浏览器可能表现出 <ol> 的 效果,于旧版的 IE 或 NC 标记 <DIR> 不显示符号或数目。两标记的用法与 <ul> 完全一 样。

例子:
 

■ <DL> <DT> <DD> :
 
  <DL>称为定义清单标记。 <DT> 用以标示定义条目,<DD> 则用以标示定义内容。
  所谓定义清单就是一种分二层的项目清单,其不故符号及数目。
  三个标记都没有常用的参数。而 <DT> <DD> 可以独立使用,只是一些旧的浏览器并不支 援,如 IE 3.0。常用的如 <DD> 标记可用以制造段落第一个字前面的空白。

例子:

原始码 <dl>
<dt>How to use Definition List
<dd>First, you should not place paragraph tag right after or before a list structure or between the items of a list. In cerntain contexts, use of extra paragraph tags should always be avoided, when you realize this concept, it is quit easy to write a HTML.
<dt>Other things to know
<dd>We usually put only ONE Definition tag following the Definition Term tag, more than one DD tag is not recommanded. Besides, unlike Definition List is a nonempty tag, both Definition Term and Definition Description are empty tags.
</dl>
显示结果
How to use Definition List
First, you should not place paragraph tag right after or before a list structure or between the items of a list. In cerntain contexts, use of extra paragraph tags should always be avoided, when you realize this concept, it is quit easy to write a HTML.
Other things to know
We usually put only ONE Definition tag following the Definition Term tag, more than one DD tag is not recommanded. Besides, unlike Definition List is a nonempty tag,

 

Source Code (原始码) 浏览器显示结果
My Homepages:
<dir>
<li>Penpals Garden
<li>ICQ Garden
<li>Software City
<li>Creation of Webpage
</dir>
My Homepages:
  • Penpals Garden
  • ICQ Garden
  • Software City


  • 相关热词搜索:

     
    上一篇:HTML语言剖析(五)字体标记
    下一篇:HTML语言剖析(七)表格标记
    收藏 将此文推荐给朋友
    分享到: