HTML5 <ul> 标签

定义和用法

<ul> 标签无序列表。

HTML 4.01 与 HTML5 之间的差异

在 HTML 4.01 中,ul 元素的 "compact" 和 "type" 属性是不被赞成使用的。在 HTML5 中,不再支持这两个属性。

提示和注释

提示:请使用 CSS 来定义列表的类型。

例子

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

属性

标准属性

class, contenteditable, contextmenu, dir, draggable, id, irrelevant, 
lang, ref, registrationmark, tabindex, template, title

如需完整的描述,请访问 HTML5 中标准属性

事件属性

onabort, onbeforeunload, onblur, onchange, onclick, oncontextmenu, 
ondblclick, ondrag, ondragend, ondragenter, ondragleave, ondragover, 
ondragstart, ondrop, onerror, onfocus, onkeydown, onkeypress, onkeyup, 
onload, onmessage, onmousedown, onmousemove, onmouseover, onmouseout, 
onmouseup, onmousewheel, onresize, onscroll, onselect, onsubmit, onunload

如需完整的描述,请访问 HTML5 中事件属性

TIY 实例

无序列表
本例演示一个无序列表。
嵌套列表
本例演示如何嵌套列表。
嵌套列表 2
本例演示更复杂的嵌套列表。

Copyright © 2012-2015 BETWAY官网网 版权所有