align (HTML attribute)
| Depr. | Version |
|---|---|
| Yes | HTML 3.2 |
| IE5.5+ | FF1+ | Saf1.3+ | Op9.2+ |
|---|---|---|---|
| Partial | Full | Partial | Partial |
Example
The align for
this caption is set to
"right":
<table>
<caption align="right">Interest Rates</caption>
<tr>
<th>Account Type</th>
<th>Interest Rate</th>
</tr>
<tr>
<td>Smart</td>
<td>From 2%</td>
</tr>
<tr>
<td>Young Saver</td>
<td>From 1.6%</td>
</tr>
</table>
Description
The align
attribute should, in theory, align the caption as a
block element to the left or right of, or above or below, the table, in
the same way in which this attribute would work when applied to a table or
an image. However, browser support for the attribute is poor, and it’s
inconsistently interpreted and presented.
Value
Possible values for this attribute
include "bottom", "left",
"right", and "top".
Compatibility
| IE | 5.5 | Partial |
|---|---|---|
| 6.0 | Partial | |
| 7.0 | Partial | |
| Firefox | 1.0 | Full |
| 1.5 | Full | |
| 2.0 | Full | |
| Safari | 1.3 | Partial |
| 2.0 | Partial | |
| 3.0 | Partial | |
| Opera | 9.2 | Partial |
| 9.5 | Partial |
This attribute is now deprecated, and is highly presentational in its nature. The desired visual effects can all be achieved with CSS and, as such, this attribute shouldn’t be used—it’s presented here for informational purposes only.
Browser support for this attribute is mixed.
Firefox honors all the alignment settings, while Safari honors only the
"bottom" attribute value, ignoring
"left" and "right". Opera doesn’t
align the caption left or right as a block-level
element, but does align the text contained inside the caption
left or right, as does Internet Explorer. In short, don’t count on being
able to style a table
caption.
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.

