HTML 5 <embed> 標簽
定義和用法
<embed> 標簽定義嵌入的內容,比如插件。
HTML 4.01 與 HTML 5 之間的差異
<embed> 標簽是 HTML 5 中的新標簽。
提示和注釋
注釋:<embed> 標簽必須有 src 屬性。
提示:您無法在開始標簽和結束標簽之間寫文本,來說明舊式的瀏覽器不支持該標簽,就像 <audio> 和 <video>。
例子
<embed src="horse.wav" />
屬性
屬性 | 值 | 描述 |
---|---|---|
height | pixels | 設置嵌入內容的高度。 |
src | url | 嵌入內容的 URL。 |
type | type | 定義嵌入內容的類型。 |
width | pixels | 設置嵌入內容的寬度。 |
標準屬性
class, contenteditable, contextmenu, dir, draggable, id, irrelevant, lang, ref, registrationmark, tabindex, template, title
如需完整的描述,請訪 HTML 5 中標準屬性。
事件屬性
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 中事件屬性。