打印

html之清单标记

html之清单标记

■ 清单标记
<ol> <li>
<ul>
<menu> <dir>
<dl> <dt> <dd>
  欲明白本篇【html彻底剖析】之标记分类,请看 【标记一览】。
  也请先明白围堵标记与空标记的分别,请看 【html概念】。

■ <ol> <li> :▲top

  <ol>称为顺序清单标记。<li>则用以标示清单项目。
  所谓顺序清单就是在每一项前加上 1,2,3... 等数字,又称编号清单。
  <ol> 的参数设定(常用):
  例如: <ol type="i" start="4"></ol>
type="i"
设定数目款式,其值有五种,请参考右表,默认为 type="1"。
start="4"
设定开始数目,不论设定了哪一数目款式,其值只能是 1,2,3.. 等整数,默认为 start="1"。
typenumbering style
1arabic numbers1, 2, 3, ...
alower alphaa, b, c, ...
aupper alphaa, b, c, ...
ilower romani, ii, iii, ...
iupper romani, ii, iii, ...


  <li> 的参数设定(常用):
  例如: <li type="square" value="4">
type="square"
只适用于非顺序清单,设定符号款式,其值有三种,如下,默认为 type="disc":
符号  是当 type="disc" 时的列项符号。
符号  是当 type="circle" 时的列项符号。
符号  是当 type="square" 时的列项符号。
value="4"
只适用于顺序清单,设定该一项的数目,其后各项将以此作为起始数目面递增, 但前面各项则不受影响,其值只能是 1,2,3.. 等整数,没有默认值。
例子: html source code (原代码)浏览器显示结果
my best friends:
<ol>
<li>michelle wei
<li>michael wan
<li>gloria lam
</ol> my best friends:
michelle wei
michael wan
gloria lam


■ <ul> :▲top

  <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
creation of webpage


■ <menu> <dir> :▲top

  这两个标记不为 w3c 所赞同,希望使用者能以 <ul> 及 <ol> 代替。
  <menu> 及 <dir>,基本上它和 <ul> 是一样的,在一些特别的浏览器可能表现出 <ol> 的效果,于旧版的 ie 或 nc 标记 <dir> 不显示符号或数目。两标记的用法与 <ul> 完全一样。
例子: html 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
creation of webpage


■ <dl> <dt> <dd> :▲top

  <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, both definition term and definition description are empty tags.

转自:动态网制作指南 www.knowsky.com


TOP

返回顶部
AYBlue

Processed in 0.057477 second(s), 7 queries.

当前时区 GMT+8, 现在时间是 2009-1-8 13:27 京ICP备06054220号

清除 Cookies - 联系我们 - 163K.com - Archiver - WAP