HTML 5 <li> 标签

定义和用法

<li> 标签定义列表项,有序列表和无序列表中都使用 <li> 标签。

HTML 4.01 与 HTML 5 之间的差异

在 HTML 4.01 中, 不赞成使用 "type" 和 "value" 属性。

在 HTML 5 中,不再支持 "type" 属性。

在 HTML 5 中, 并没有不赞成使用 "value" 属性,但是仅能够与 <ol> 元素一起使用。

属性

属性 描述 DTD
type
  • A
  • a
  • I
  • i
  • 1
  • disc
  • square
  • circle
规定列表的类型。不赞成使用。请使用样式替代。TF
valuenumber_of_list_item不赞成使用。请使用样式替代。TF

标准属性

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

事件属性

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