HTML <legend> align 属性
实例
对标题进行右对齐:
  
    <form>
<fieldset>
<legend align="right">Personalia:</legend>
Name: <input type="text" size="30"><br>
Email: <input type="text" size="30"><br>
Date of birth: <input type="text" size="10">
</fieldset>
</form>
<fieldset>
<legend align="right">Personalia:</legend>
Name: <input type="text" size="30"><br>
Email: <input type="text" size="30"><br>
Date of birth: <input type="text" size="10">
</fieldset>
</form>
尝试一下 »
浏览器支持





除了 Opera,其他主流浏览器都支持 align 属性的 "left" 和 "right" 值。几乎没有主流浏览器支持 "bottom" 值。
定义和用法
HTML5 不支持 <legend> align 属性。请使用 CSS 代替。
在 HTML 4.01 中,<legend> 的 align 属性 已废弃。
align 属性规定 fieldset 中标题的对齐方式。
语法
  
    <legend align="left|right|top|bottom">
属性值
| 值 | 描述 | 
|---|---|
| left | 对标题进行左对齐(默认)。 | 
| right | 对标题进行右对齐。 | 
| top | 对标题进行上对齐。 | 
| bottom | 对标题进行下对齐。 | 
 HTML <legend> 标签
  HTML <legend> 标签			
						
			
 HTML教程
HTML教程 HTML5教程
HTML5教程 HTML参考手册
HTML参考手册 HTML字符集
HTML字符集 HTML DOM 教程
HTML DOM 教程