i'm looking at the W3Schools demo of using the <COL>
element to align columns:
<table width="100%" border="1">
<col align="left" />
<col align="left" />
<col align="right" />
<tr>
<th>ISBN</th>
<th>Title</th>
<th>Price</th>
</tr>
<tr>
<td>3476896</td>
<td>My first HTML</td>
<td>$53</td>
</tr>
</table>
And browser's rendering of it is not encouraging:
Chrome (10.0.648.127):
FireFox (3.6.8):
Internet Explorer 9 (standards mode):
Internet Explorer 8 (standards mode):
Internet Explorer 7 (standards mode):
Internet Explorer (quirks mode):
It's interesting to note that <COL align>
used to work in browsers, and the feature was taken away in ie8. (And Chrome, with position of being the arbiter of all things perfect, doesn't support it.)
This makes me wonder if <COL align>
is something that's not supposed to work.
Has <COL align>
been deprecated?
Update One
i understand that it hasn't been formally deprecated. But the fact that browsers used to support it, then stopped supporting it makes me believe that there is some historical story that i'm missing. i assume the intentional removal of col align
support from IE, and the continued lack of support from other browsers, indicates something is going on.
Update Two
i was mistakenly assuming lack of support for all features of <COL>
meant <COL>
itself isn't supported. i mistakenly assumed that since the only attribute i was trying wasn't working: that the element wasn't working. This was my mistake; and in hindsight i should have asked if "COL align" is deprecated (which it is).
In my defense i assumed an example would have been shown what wasn't working "anymore".
<col />
elements must be wrapped in<colgroup />
elements. Also, your earlier edit was missing a<!DOCTYPE html>
, so it would have triggered quirks mode. – Superscriptionalign
, except that in HTML5align
is obsolete. That is why IE stopped supporting it. And while w3fools might prefer wiki edited examples, the page (in it's lengthly list of complaints) has no quarrel withCOL align
. So there really isn't a need to link to it on this particular StackOverflow question: since nothing on w3fools applies. If there was a mistake in the HTML, then any correction on w3fools would be helpful. But since there wasn't: it isn't. – Downstage