<legend>

HTML <legend> 元素用于表示其父元素 <fieldset> 的内容标题。

尝试一下

内容分类 (en-US) 无。
允许的内容 语句内容(Phrasing content)。
标签忽略 不允许,开始标签和结束标签都不能省略。
允许的父元素 <fieldset> ,并且<legend>作为第一个子元素
Implicit ARIA role No corresponding role
Permitted ARIA roles No role permitted
DOM 接口 HTMLLegendElement (en-US)

属性

这个元素只有全局属性

示例

<form> 中查看关于 <legend> 元素的示例。

规范

Specification
HTML Standard
# the-legend-element

浏览器兼容性

BCD tables only load in the browser

参见