HTML 5 <legend> 标签

定义和用法

<legend> 标签为 <fieldset>、<figure> 以及 <details> 元素定义标题。

HTML 4.01 与 HTML 5 之间的差异

在 HTML 4.01 中, <legend> 仅用于 <fieldset> 元素。

在 HTML 5 中, <legend> 标签应用于 <fieldset>、<figure> 以及 <details> 元素。

在 HTML 5 中,不支持 align 属性。请使用 CSS 代替。

标准属性

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

事件属性

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