HTML 5 <source> 標(biāo)簽
定義和用法
<source> 標(biāo)簽為媒介元素(比如 <video> 和 <audio>)定義媒介資源。
HTML 4.01 與 HTML 5 之間的差異
<source> 標(biāo)簽是 HTML 5 中的新標(biāo)簽。
屬性
屬性 | 值 | 描述 |
---|---|---|
media | media query | 定義媒介資源的類型,供瀏覽器決定是否下載。 |
src | url | 媒介的 URL。 |
type | numeric value | 定義播放器在音頻流中的什么位置開始播放。默認(rèn)地,音頻從開頭播放。 |
標(biāo)準(zhǔn)屬性
class, contenteditable, contextmenu, dir, draggable, id, irrelevant, lang, ref, registrationmark, tabindex, template, title
如需完整的描述,請訪問 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
如需完整的描述,請訪問 HTML 5 中事件屬性。