HTML legend align property
Examples
On the right-aligned headings:
<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>
try it"
Browser Support
In addition to Opera, the other major browsers support align attribute "left" and "right" values. Almost no major browsers support the "bottom" value.
Definition and Usage
HTML5 does not support the <legend> align attribute. Use CSS instead.
In HTML 4.01, <legend> The align attribute is deprecated .
align attribute specifies fieldset title alignment.
grammar
<legend align="left|right|top|bottom">
Property Value
值 | 描述 |
---|---|
left | 对标题进行左对齐(默认)。 |
right | 对标题进行右对齐。 |
top | 对标题进行上对齐。 |
bottom | 对标题进行下对齐。 |
HTML <legend> tag