The Evils of Tables
Moderator: General Moderators
The Evils of Tables
Why is using tables in a layout considered a bad idea? I've heard the explanation of mobile devices being optimized for tabular data, but I own several and haven't experienced any problems so far. Are there any other reasons?
Re: The Evils of Tables
There are several reasons:
1. Tables do not have the correct semantic value. A search engine encountering a table would first assume it is seeing tabular data, which is less important than headers, paragraphs etc.
2. Styling table using CSS is harder. They are much restrictive in what they can do. This is why you see a lot of table-based design using nested tables. Nested tables are a maintenance nightmare (so much markup it is very hard to make changes across the board). In addition, browser require more overhead to render tables, and nested tables amplify this effect. This is also prevent incremental rendering.
3. Tables mean more markup - you have at least 3 levels (table -> tr -> td). More markup means less readable code, and more HTML to go around (page load speed).
4. Screen readers / mobile devices (an evergrowing market) will have trouble with the layout.
In general, there is no good reason to use tables for layout, except of one famously annoying browser. Personally, I haven't found in instance in recent memory that I needed a table to implement a layout.
1. Tables do not have the correct semantic value. A search engine encountering a table would first assume it is seeing tabular data, which is less important than headers, paragraphs etc.
2. Styling table using CSS is harder. They are much restrictive in what they can do. This is why you see a lot of table-based design using nested tables. Nested tables are a maintenance nightmare (so much markup it is very hard to make changes across the board). In addition, browser require more overhead to render tables, and nested tables amplify this effect. This is also prevent incremental rendering.
3. Tables mean more markup - you have at least 3 levels (table -> tr -> td). More markup means less readable code, and more HTML to go around (page load speed).
4. Screen readers / mobile devices (an evergrowing market) will have trouble with the layout.
In general, there is no good reason to use tables for layout, except of one famously annoying browser. Personally, I haven't found in instance in recent memory that I needed a table to implement a layout.
Re: The Evils of Tables
Let me guess: IE.pytrin wrote:one famously annoying browser
Re: The Evils of Tables
IE6.0, Microsoft's way of showing us how much they love developers 
Re: The Evils of Tables
CSS for tables is annoying to work with too. For building a clean, fast-loading web page, you can't beat good CSS!
IE.....
IE.....
Re: The Evils of Tables
%#@! IE6, don't frame your creativity because of one flawed product. Version 8 is out anyway and IE6 is fading away day by day by either its updated version or Firefox. Heck I even teach my clients use Firefox.
CSS has some flaws design-wise. I personally find it that whoever made up CSS was not thinking as a web designer.
CSS has some flaws design-wise. I personally find it that whoever made up CSS was not thinking as a web designer.
Re: The Evils of Tables
my opinion is that tables are designed for, guess what...tables !
what has happened was that in the past this was 'abused'. a whole content of a page, which is supposed to in either a paragraph, or a divider is placed inside a table. this is the great mistake.
halfway along the table containing the content, came a table of statistics say. then you have a table in a table. or wait a minute, no you have a table in a td of a table. and this new table had a td and when you want to add new to row, you need to look at a whole list of table/tbody/tr/td/table/table/tbody/tr/td/tr/td/tr/td/tr/td/tbody/tdand by the time you finised you would have typically missed your lunch.
note however, the same horror can be made using a divs. but with tables, the error is a lot more amplified.
i have had to edit such a layout once, it took about 50 guys about 5 days to spot the error of why a certain image does not center on the page. everything else was tried even <center>, css, new tables. so this is one experience you can do without. i finally spotted it and earned some pocket money, but if anyone asks me to go through it again i would politely decline. it's just not worth it. its better i spend time developing someting new. done by one of the top designers, it was a marvel that he achieved precision with this. it does not mean this designer is no good, on contrary he was one of the best. it is just that div was not invented yet. his new designs are of course all tablesless.
so stick table to what it is for best. when you want a tabulated data, nothing beats table.
and i beg to differ to a comment that there was no need ever to use table. if you try tabulate a set of statistics data with div, you will end up even longer than what a table could easily achieve within seconds. and tables can be styled as easily as like any other element, provided you aren't compromising the table by putting in it other than a simple data content.
there is no sin to using a table at all to tabulate data, and in fact you should. for all other purposes, please do avoid it unless you want to miss lunch.
ok, i'm going for lunch now.
what has happened was that in the past this was 'abused'. a whole content of a page, which is supposed to in either a paragraph, or a divider is placed inside a table. this is the great mistake.
halfway along the table containing the content, came a table of statistics say. then you have a table in a table. or wait a minute, no you have a table in a td of a table. and this new table had a td and when you want to add new to row, you need to look at a whole list of table/tbody/tr/td/table/table/tbody/tr/td/tr/td/tr/td/tr/td/tbody/tdand by the time you finised you would have typically missed your lunch.
note however, the same horror can be made using a divs. but with tables, the error is a lot more amplified.
i have had to edit such a layout once, it took about 50 guys about 5 days to spot the error of why a certain image does not center on the page. everything else was tried even <center>, css, new tables. so this is one experience you can do without. i finally spotted it and earned some pocket money, but if anyone asks me to go through it again i would politely decline. it's just not worth it. its better i spend time developing someting new. done by one of the top designers, it was a marvel that he achieved precision with this. it does not mean this designer is no good, on contrary he was one of the best. it is just that div was not invented yet. his new designs are of course all tablesless.
so stick table to what it is for best. when you want a tabulated data, nothing beats table.
and i beg to differ to a comment that there was no need ever to use table. if you try tabulate a set of statistics data with div, you will end up even longer than what a table could easily achieve within seconds. and tables can be styled as easily as like any other element, provided you aren't compromising the table by putting in it other than a simple data content.
there is no sin to using a table at all to tabulate data, and in fact you should. for all other purposes, please do avoid it unless you want to miss lunch.
ok, i'm going for lunch now.
Re: The Evils of Tables
actually, when you read the things written by them, there is mention that 'it is a mistake to treat beautifying markup as being more important than the data itself' or something to that effect. so your theory is quite correct i think.Sindarin wrote:CSS has some flaws design-wise. I personally find it that whoever made up CSS was not thinking as a web designer.
Re: The Evils of Tables
I don't know why people get so judgmental about CSS! Consider the vast array of things possible with CSS, and how relatively easy it is to get started with it. If anything, perhaps tables should have been designed in such a way that they were less easy to use for design, and CSS could have had more carefully planned syntax, but we must work with what we have, and we must learn to use it as effectively as possible. CSS is really a very powerful standard, and for what it does, I could hardly come up with a better way.
Re: The Evils of Tables
I am still waiting for someone to step right up and propose a new cool stylesheet standard called "XCSS 1.0" to the w3c. 