当前位置: 首页 > 网络学院 > 网页制作基础教程 > HTML > HTML <li>标签

HTML
HTML Head
HTML Meta
HTML URLs
HTML Scripts
HTML 属性
HTML 事件
HTML URL-encode
HTML Web服务器
HTML 摘要
HTML 实例
标签列表
标准属性
事件属性
ASCII码
特殊字符
HTTP状态消息

HTML <li>标签


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 404 ::
收藏到网摘: n/a

定义与用法

The <li> tag defines the start of a list item. The <li> tag is used in both ordered (<ol>) and unordered lists (<ul>).
<li>标签可用来定义离别的项目的起始标签。<li>标签用于有序(<ol>)和无序(<ul>)元素里


在HTML和XHTML中的区别

The "type" and "value" attributes of the li element were deprecated in HTML 4.01.
li元素的"type"和"value"属性HTML4.01不推荐使用

The "type" and "value" attributes of the li element are not supported in XHTML 1.0 Strict DTD.
li元素的"type"和"value"属性在XHTML1.0严密型DTD里已得不到支持。


提示与注意点

Tip: Use styles to define the type of list.
提示:
可以使用样式来定义列表的类型


实例

代码 输出结果
<ol>
<li>Coffee</li>
<li>Tea</li>
</ol>

<ul>
<li>Coffee</li>
<li>Tea</li>
</ul>

  1. Coffee
  2. Tea
  • Coffee
  • Tea


可选属性

DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.
下表中的DTD列指明了被支持的DTD属性。S=Strict(精确的),T=Transitional(传统的),F=Frameset(框架)

属性 描述 DTD
type A
a
I
i
1
disc
square
circle
Specifies the type of the list. Deprecated. Use styles instead
为列表指定类型。[不推荐]使用样式来替代
TF
value number_of_list_item Deprecated. Use styles instead
[不推荐]用样式替代
TF

标准属性

id, class, title, style, dir, lang, xml:lang

For a full description, go to Standard Attributes.
查看完整的属性

Event Attributes

onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

For a full description, go to Event Attributes.
查看完整的属性


尝试与演示

An unordered list
An unordered list.
无序列表

An ordered list
An ordered list.
有序列表

A nested list
A nested list.
嵌套列表

Another nested list
A more complicated nested list.
多层嵌套列表

评论 (0) All

登陆 | 还没注册?