HTML 5 <embed> 標(biāo)簽
定義和用法
<embed> 標(biāo)簽定義嵌入的內(nèi)容,比如插件。
HTML 4.01 與 HTML 5 之間的差異
<embed> 標(biāo)簽是 HTML 5 中的新標(biāo)簽。
提示和注釋
注釋:<embed> 標(biāo)簽必須有 src 屬性。
提示:您無(wú)法在開(kāi)始標(biāo)簽和結(jié)束標(biāo)簽之間寫文本,來(lái)說(shuō)明舊式的瀏覽器不支持該標(biāo)簽,就像 <audio> 和 <video>。
例子
<embed src="horse.wav" />
屬性
屬性 | 值 | 描述 |
---|---|---|
height | pixels | 設(shè)置嵌入內(nèi)容的高度。 |
src | url | 嵌入內(nèi)容的 URL。 |
type | type | 定義嵌入內(nèi)容的類型。 |
width | pixels | 設(shè)置嵌入內(nèi)容的寬度。 |
標(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 中事件屬性。