技术文档

HTML <legend> 标签

更新时间:2025-03-13 浏览量:

实例

组合表单中的相关元素:

<form>

<fieldset>

<legend>health information</legend>

height: <input type="text" />

weight: <input type="text" />

</fieldset>

</form>

浏览器支持  

所有浏览器都支持<legend>标签。  

定义和用法  

legend元素为fieldset元素定义标题(caption)。  

HTML与XHTML之间的差异  

在HTML4.01中,align属性不被赞成使用。  

在XHTML1.0StrictDTD中,align属性不被支持。  

可选的属性  

DTD指示此属性允许在哪种DTD中使用。S=Strict,T=Transitional,F=Frameset.

属性描述DTD
aligntop
bottom
left
right
不赞成使用。请使用样式代替。


为 fieldset 中的标题定义对齐方式。

TF