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>標籤