align (HTML attribute)
| Depr. | Version |
|---|---|
| Yes | HTML 4 |
| IE5.5+ | FF1+ | SA1.3+ | OP10 | CH2+ |
|---|---|---|---|---|
| Partial | Partial | Partial | None | Partial |
Syntax
Description
The
align attribute is intended to enable finer
positioning of the text in relation to the fieldset’s
boxed outline. In practice, though, you won’t find much use for this
attribute, as it’s deprecated and poorly supported. Aside from the default
position (top, left), few of the tested browsers paid any attention to any
of the other values, aside from the "right" alignment,
as Figure 1 shows.
legend element
Example
The align
attribute for this group of controls is 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>
Value
This attribute accepts as its values
"bottom", "left",
"right", and "top". The browser
default is "left".
Compatibility
| Internet Explorer | Firefox | Safari | Opera | Chrome | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 5.5 | 6.0 | 7.0 | 8.0 | 1.0 | 1.5 | 2.0 | 1.3 | 2.0 | 3.1 | 4.0 | 9.2 | 9.5 | 10.0 | 2.0 |
| Partial | Partial | Partial | Partial | Partial | Partial | Partial | Partial | Partial | Partial | Partial | None | None | None | Partial |
This attribute is poorly supported and highly presentational. CSS should be used to control appearance instead.
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.