<legend>: The Field Set Legend element
<legend> HTML 元素表示其父 <fieldset> 的内容的标题。
¥The <legend> HTML element represents a caption for the content of its parent <fieldset>.
Try it
属性
示例
技术总结
¥Technical summary
| 内容类别 | 没有任何。 |
|---|---|
| 允许的内容 | 措辞内容 和 headings(h1–h6 元素)。 |
| 标签遗漏 | 无,开始和结束标记都是强制性的。 |
| 允许的父级 |
一个 <fieldset>,其第一个子元素是此
<legend> 元素
|
| 隐式 ARIA 角色 | 没有对应的角色 |
| 允许的 ARIA 角色 | 不允许 role |
| DOM 接口 | HTMLLegendElement |
规范
| Specification |
|---|
| HTML Standard # the-legend-element |
浏览器兼容性
BCD tables only load in the browser
也可以看看
¥See also