网页制作 > HTML/Xhtml >
HTML网页列表标记学习教程
佚名
有序列表的类型属性TYPE
在有序列表的默认情况下,使用数字序号作为列表的开始,我们可以通过type属性将有序列表的类型设置为英文或罗马字母。
其中value的值如下表所示值
描述
1
数字1,2,3……
a
小写字母a,b,c
A
大写字母A,B,C
i
小写罗马数字i,ii,iii……
I
大写罗马数字Ⅰ,Ⅲ,Ⅲ……
文件范例:7-2.htm
通过type属性设定有序列表编号的类型。
01 <!-- ------------------------------ -->
02 <!-- 文件范例:7-2.htm -->
03 <!-- 文件说明:设定有序列表编号类型-->
04 <!-- ------------------------------ -->
05 <html>
06 <head>
07 <title>设定有序列表编号类型</title>
08 </head>
09 <body>
10 <h2>图像设计软件</h2>
11 <ol type=a>
12 <li>Photoshop
13 <li>Illustrator
14 <li>Freehand
15 <li>CorelDraw
16 </ol>
17 <hr>
18 <h2>图像设计软件</h2>
19 <ol type=I>
20 <li>Photoshop
21 <li>Illustrator
22 <li>Freehand
23 <li>CorelDraw
24 </ol>
25 <hr>
26 <h2>网页动画软件</h2>
27 <ol type=i>
28 <li>Flash
29 <li>LiveMotion
30 </OL>
31</body>
32 </html> 文件说明
第11行定义了列表的编号类型为小写字母,第19行定义了列表的编号类型为大写的罗马字母,第27行定义了列表的编号类型为小写的罗马字母。
在有序列表的默认情况下,使用数字序号作为列表的开始,我们可以通过type属性将有序列表的类型设置为英文或罗马字母。
-
基本语法
<ol type=value> </ol>
其中value的值如下表所示
通过type属性设定有序列表编号的类型。
01 <!-- ------------------------------ -->
02 <!-- 文件范例:7-2.htm -->
03 <!-- 文件说明:设定有序列表编号类型-->
04 <!-- ------------------------------ -->
05 <html>
06 <head>
07 <title>设定有序列表编号类型</title>
08 </head>
09 <body>
10 <h2>图像设计软件</h2>
11 <ol type=a>
12 <li>Photoshop
13 <li>Illustrator
14 <li>Freehand
15 <li>CorelDraw
16 </ol>
17 <hr>
18 <h2>图像设计软件</h2>
19 <ol type=I>
20 <li>Photoshop
21 <li>Illustrator
22 <li>Freehand
23 <li>CorelDraw
24 </ol>
25 <hr>
26 <h2>网页动画软件</h2>
27 <ol type=i>
28 <li>Flash
29 <li>LiveMotion
30 </OL>
31</body>
32 </html> 文件说明
第11行定义了列表的编号类型为小写字母,第19行定义了列表的编号类型为大写的罗马字母,第27行定义了列表的编号类型为小写的罗马字母。