| Depr. | Version |
|---|---|
| Yes | HTML 3.2 |
| IE5.5+ | FF1+ | SA1.3+ | OP9.2+ | CH2+ |
|---|---|---|---|---|
| Partial | Full | Partial | Partial | Partial |
Syntax
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.
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>
Value
Possible values for this attribute
include "bottom", "left",
"right", and "top".
Compatibility
| Internet Explorer | Firefox | Safari | Opera | Chrome | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 5.5 | 6.0 | 7.0 | 8.0 | 1.0 | 1.5 | 2.0 | 3.0 | 3.5 | 1.3 | 2.0 | 3.1 | 4.0 | 9.2 | 9.5 | 10.0 | 2.0 |
| Partial | Partial | Partial | Partial | Full | Full | Full | Full | Full | Partial | Partial | Partial | Partial | Partial | Partial | Partial | 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 and Chrome honor
only the "top" (default) and
"bottom" attribute values, 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 using this attribute
alone.
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.