align (HTML attribute)
Example
The align for
this group of controls set to "right":
<form> <fieldset> <legend accesskey="1" align="right">Friendship</legend> <input type="radio" name="radFriendship" value="Not_Applicable" id="radFriendNot_Applicable" /> <label for="radFriendNot_Applicable">Not_Applicable</label> <input type="radio" name="radFriendship" value="acquaintance" id="radFriendaquaintence" /> <label for="radFriendaquaintence">acquaintance</label> <input type="radio" name="radFriendship" value="friend" id="radFriendfriend" /> <label for="radFriendfriend">friend</label> </fieldset> </form>
Description
The align
attribute is supposed to enable finer positioning of the text in relation
to the fieldset’s boxed outline. In practice, though,
you will not find much use for this attribute as it is deprecated and
poorly supported. Aside from the default position (top, left), few
browsers tested paid any attention to any of the other values, aside from
the "right" alignment, as shown in #align/fig-legend-right-align.
Value
"bottom",
"left", "right" and
"top" only (browser default is
"left").
Compatibility
| IE | 5.5 | Partial |
|---|---|---|
| 6.0 | Partial | |
| 7.0 | Partial | |
| Firefox | 1.0 | Partial |
| 1.5 | Partial | |
| 2.0 | Partial | |
| Safari | 1.3 | Partial |
| 2.0 | Partial | |
| 3.0 | None | |
| Opera | 9.2 | None |
| 9.5 | None |
This attribute is poorly supported and is also highly presentational in nature. CSS should be used instead for affecting appearance.
User-contributed notes
There are no comments yet.
Add a note
To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

