Align the caption to the right:
The align attribute specifies the alignment of the caption in a fieldset.
Attribute | |||||
---|---|---|---|---|---|
align | Yes | Yes | Yes | Yes | Yes |
The "left" and "right" values of the align attribute is supported in all major browsers, except Opera 12 and earlier versions. The "bottom" value does not work in any of the major browsers.
The align attribute of <legend> is not supported in HTML5. Use CSS instead.
CSS syntax: <legend style="float:right">
CSS Example: Let the fieldset caption float to the right
In our CSS tutorial you can find more details about the float property.
Value | Description |
---|---|
left | Aligns the caption to the left (this is default) |
right | Aligns the caption to the right |
top | Aligns the caption at the top |
bottom | Aligns the caption at the bottom |