HTML 5 <body> 標(biāo)簽
定義和用法
body 元素定義文檔的主體。其中包含文檔的所有內(nèi)容(比如文本、圖像、顏色、圖形等等)。
HTML 4.01 與 HTML 5 之間的差異
在 HTML 5 中,刪除了所有 <body> 的特殊屬性。而那些屬性在 HTML 4.01 中是不被贊成使用的。
例子:
<html> <head></head> <body>文檔的內(nèi)容 ......</body> </html>
屬性
標(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 中事件屬性。
TIY 實例
- 引用
- 此例演示如何實現(xiàn)長短不一的引用。