HTML 5 <dt> 標(biāo)簽
定義和用法
<dt> 標(biāo)簽定義一個定義列表中的一個項目,以及 dialog 中的角色。
HTML 4.01 與 HTML 5 之間的差異
HTML 5 引入了 <dialog> 標(biāo)簽。在 dialog 中,<dt> 標(biāo)簽定義句子所屬的角色。參見例子 2。
例子
例子 1
<dl> <dt>Coffee</dt> <dd>Black hot drink</dd> <dt>Milk</dt> <dd>White cold drink</dd> </dl>
例子 2
<dialog> <dt>老師</dt> <dd>2+2 等于?</dd> <dt>學(xué)生</dt> <dd>4</dd> <dt>老師</dt> <dd>答對了!</dd> </dialog>
屬性
標(biāo)準屬性
class, contenteditable, contextmenu, dir, draggable, id, irrelevant, lang, ref, registrationmark, tabindex, template, title
如需完整的描述,請訪 HTML 5 中標(biāo)準屬性。
事件屬性
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
如需完整的描述,請訪 HTML 5 中事件屬性。
TIY 實例
- 定義列表
- 如何創(chuàng)建定義列表。