Leif said:
To be deprecated, something has to appear in a standard in the first
place. The standard does speak against tables for layout, though:
I was making the point that no one is about to stop table-layout from working.
The key is that it doesn't actually need extra features. It simply uses
features that are there anyway. There is no algorithm that I now of that will
even reliably detect that some *is* using table-layout. That is why it is
safe.
"Tables should not be used purely as a means to layout document
content as this may present problems when rendering to non-visual
media." from
http://www.w3.org/TR/html4/struct/tables.html#h-11.1
That was published in 1999. So, should a person reading that in 1999 have
immediately stopped using tables for layout, and used CSS instead? No - that
was an aspiration, not a rule with immediate effect. The world wasn't ready in
1999 to consistently use CSS positioning instead of table-layout.
Does the document say "this comes into effect in 2003"? Or is there some other
W3C recommendation that says this - a "commencement order"? No - in fact,
there is still talk in parts of the W3C web site about the need for extra
features to replace table-layout. In 2000 W3C was defending its own use of
table-layout.
http://lists.w3.org/Archives/Public/w3c-wai-gl/2001JanMar/0463.html
http://lists.w3.org/Archives/Public/site-comments/2000Jul/0040.html
So why do some people appear to believe that these statements from W3C are
something we should be doing *now*, rather than at some unspecified time, or
"when you judge it is ready for your particular case"? Why *now*?
They "work" simply because of luck. There is nothing wrong with
browsers which render tabled layouts correctly, but there would be
nothing wrong with them if they rendered tables differently (rows
being up-and-down, say) either.
No, it works because there is a convention in the West, that *long* preceded
the web, that tabular data should be laid out in a horizontal & vertical grid.
People using table-layout didn't say "let's use tables, and hope that tables
lay things out in a grid". They said "we want to lay things out in a grid, now
what works like that - ah, tables". They wouldn't have used tables unless
tables naturally worked in the right way.
As the W3C says: "The HTML table model has evolved from studies of existing
SGML tables models, the treatment of tables in common word processing
packages, and a wide range of tabular layout techniques in magazines, books
and other paper-based documents". They then talk a lot about left to right &
top to bottom layout recommendations. All the table-layout people are doing is
exploiting the fact that W3C and the user agent developers did some sensible
work on how to layout material marked-up with <table>. After, of course,
devising <table> as a way of marking-up material that conventionally would be
laid out in such a grid format in the first place! These were not accidents.
http://www.w3.org/TR/html4/appendix/notes.html#notes-tables
The best way to know what the designers of HTML intented is to read
the standard. It clearly states what tables were and were not
designed for.
As I said - so what? (Some of our roads were designed for chariots). They
work, and will continue to do so. Because they were intended to enable people
to mark-up material so that typically a user agent with a large-enough
viewport would lay them out in grid format. I have seen no evidence that they
were supposed *not* to work for layout purposes. I don't think there was ever
a proposal intended to stop them being used for this purpose.
I see the W3C statements as *not* saying "table-layout is wrong", but instead
saying "CSS is the target way of solving these problems". In other words,
interpret them as a carrot - "this is better", not a stick - "this is
naughty".
Since 1999, non-visual user agents appear to have got better at handling
tables. I've been using IBM Home Page Reader, and it was able to "linearise"
through tables. Opera's small screen mode shows that user agents in principle
have the option of mapping table-layout onto small screens. So things have
moved on a bit since 1999. In 5 years time, they will have moved on more, and
some of the browser problems we have at the moment with CSS positioning will
be less important. The balance between when to use table-layout and when not
to changes year by year. There may not be a clear date at which we can say
"*now* it the time to stop using table-layout". Support for both table-layout
& tableless-layout is improving.