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 | 對標題進行下對齊。 |
