HTML 5 <time> 標(biāo)簽
定義和用法
<time> 標(biāo)簽定義日期或時(shí)間,或者兩者。
HTML 4.01 與 HTML 5 之間的差異
<time> 標(biāo)簽是 HTML 5 中的新標(biāo)簽。
例子
我們?cè)诿刻煸缟?<time>9:00</time> 開(kāi)始營(yíng)業(yè)。 我在 <time datetime="2008-02-14">情人節(jié)</time> 有個(gè)約會(huì)。
屬性
屬性 | 值 | 描述 |
---|---|---|
datetime | datetime |
定義元素的日期和時(shí)間。 如果未定義該屬性,則必須在元素的內(nèi)容中規(guī)定日期或時(shí)間。 |
標(biāo)準(zhǔn)屬性
class, contenteditable, contextmenu, dir, draggable, id, irrelevant, lang, ref, registrationmark, tabindex, template, title
如需完整的描述,請(qǐng)?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
如需完整的描述,請(qǐng)?jiān)L HTML 5 中事件屬性。