HTML 5 <ol> 標(biāo)簽
定義和用法
<ol> 標(biāo)簽定義有序列表。
HTML 4.01 與 HTML 5 之間的差異
在 HTML 4.01 中,不贊成使用 "start" 屬性,在 HTML 5 中是允許的。
在 HTML 4.01 中,不贊成使用 "compact" 和 "type" 屬性,在 HTML 5 中,不再支持這兩個屬性。
提示和注釋
提示:請使用 CSS 來定義列表的類型。
例子
<ol> <li>Coffee</li> <li>Tea</li> </ol> <ol> <li start="60">Coffee</li> <li>Tea</li> </ol>
屬性
屬性 | 值 | 描述 | 4 | 5 |
---|---|---|---|---|
compact | compact_rendering | 不贊成。使用 CSS 代替。 | 4 | |
start | start_on_number | 規(guī)定起始數(shù)字。 | 4 | 5 |
type |
|
規(guī)定列表的類型。不贊成。使用 CSS 代替。 | 4 |
標(biāo)準(zhǔn)屬性
class, contenteditable, contextmenu, dir, draggable, id, irrelevant, lang, ref, registrationmark, tabindex, template, title
如需完整的描述,請?jiān)L問 HTML 5 中標(biāo)準(zhǔn)屬性。
事件屬性
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
如需完整的描述,請?jiān)L問 HTML 5 中事件屬性。
TIY 實(shí)例
- 有序列表
- 本例演示一個有序列表。