|
HTML 初学者指南(5) HTML支持有序的,无序的和陈述式列表。
无序列表
按以下格式建立一个无序列表:
- 用列表标注<UL>开始.
- 接着输入<LI>不同的列表项。 (无须</LI>标注来关闭。)
- 用</UL>作为结束标注。
以下是两个例子: <UL>
<LI> 苹果
<LI> 香蕉
</UL>
浏览器输出是:
<LI> 列表项可以包括多个段落。 段落之间可以用<P>标注来分开。
有序列表
有序列表(也称为排序列表)和无序列表除了用<OL> 代替<UL>外,和无序列表是一样的。各列表项都使用<LI> 标注。 以下是列表的HTML例子: <OL>
<LI> 橙子
<LI> 桃子
<LI> 葡萄
</OL>
浏览器输出是:
- 橙子
- 桃子
- 葡萄
陈述式列表
陈述式列表通常由DT和DD组成。 Web浏览器把陈述式列表另开新行来显示。
以下是陈述式列表的例子: <DL>
<DT> NCSA
<DD> NCSA, the National Center for Supercomputing Applications,
is located on the campus of the University of Illinois
at Urbana-Champaign. NCSA is one of the participants in the
National MetaCenter for Computational Science and Engineering.
<DT> Cornell Theory Center
<DD> CTC is located on the campus of Cornell University in Ithaca,
New York. CTC is another participant in the National MetaCenter
for Computational Science and Engineering.
</DL>
浏览器输出为:
- NCSA
- NCSA, the National Center for Supercomputing Applications, is located on the campus of the University of Illinois at Urbana-Champaign. NCSA is one of the participants in the National MetaCenter for Computational Science and Engineering.
- Cornell Theory Center
- CTC is located on the campus of Cornell University in Ithaca, New York. CTC is another participant in the National MetaCenter for Computational Science and Engineering.
|