HTML5 <div> 标签

定义和用法

<div> 标签定义文档中的 division/section。

HTML 4.01 与 HTML5 之间的差异

HTML 4.01 中的 "align" 是不赞成使用的,在 HTML5 中不支持该属性。

提示和注释

注释:浏览器通常会在 div 元素之前和之后插入换行符。

提示:请使用 <div> 标签对块级元素进行组合,这样就可以使用样式对它们进行格式化。

属性

标准属性

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 中事件属性

Copyright © 2012-2015 BETWAY官网网 版权所有