当前位置: 首页 > 网络学院 > 网页制作基础教程 > HTML > HTML <ul>标签
The <ul> tag defines an unordered list.
<ul>标签可定义无序列
The "compact" and "type" attributes of the ul element were deprecated in HTML 4.01.
HTML4.01不推荐使用ul元素的"compact" 以及"type"属性
The "compact" and "type" attributes of the ul element are not supported in XHTML 1.0 Strict DTD.
XHTML1.0严密型DTD不支持ul元素的"compact" 以及"type"属性
Tip: Use styles to define the type of list.
提示:使用样式来定义列的类型
代码 | 输出结果 |
---|---|
<ul> <li>Coffee</li> <li>Tea</li> </ul> |
|
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 |
---|---|---|---|
compact | compact_rendering | Deprecated. Use styles instead 不推荐。使用样式 | TF |
type | disc square circle | Specifies the type of the list. Deprecated. Use styles instead 指定列表的类型[不推荐]请使用样式 | TF |
id, class, title, style, dir, lang, xml:lang |
For a full description, go to Standard 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.
无序列表
A nested list
A nested list.
嵌套列表
Another nested list
A more complicated nested list.
多层嵌套列表