HTML5 <body> 标签

定义和用法

body 元素定义文档的主体。其中包含文档的所有内容(比如文本、图像、颜色、图形等等)。

HTML 4.01 与 HTML5 之间的差异

在 HTML5 中,删除了所有 <body> 的特殊属性。而那些属性在 HTML 4.01 中是不被赞成使用的。

例子:

<html>

  <head></head>

  <body>文档的内容 ......</body>

</html>

属性

标准属性

class, contenteditable, contextmenu, dir, draggable, id, irrelevant, 
lang, ref, registrationmark, tabindex, template, title

如需完整的描述,请访 HTML5 中标准属性

事件属性

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

如需完整的描述,请访 HTML5 中事件属性

TIY 实例

引用
此例演示如何实现长短不一的引用。

Copyright © 2009-2011 HTML5中文网 版权所有