What are some clear and logical reasons for why we shouldn't be designing websites with tables? Where are the benefits, what has been driving this idea in the industry? When is it okay to use a table?
|
1) Tables shouldn't be used for page layouts because they are:
2) Use a table for tabular data. That's what tables are for. |
|||||||||||||||||||||
|
|
the real cause to not use tables is: the default layout of a table is: table-layout:fixed this tells the browser to analyze the table and fix the cells to contain the elements inside them, which takes some time. (this is why tables are so good for complex data) bottom line: the table will render after all the content inside it is rendered, as opposed when using for example DIV elements. |
|||
|
|
|
Tables are for tabular data, not design. There is a commom misunderstanding by tableless buzzword. It is wrong use tables to make your layout basis. You must count on other elements for layout (divs, lists, section, article, header, footer, aside...). Thus you can achieve great effects with little HTML/CSS (what is semantic, light-weight, easy to maintain...). Of course, tabular data should be inside a table element. If you can, you can increase even tables semantic, adding thead, tfoot, tbody, th, caption... All those elements are intended to be used with tables, and believe, they can make your table much more richer. So, thing is, don't go with design and use any HTML/CSS solution that fits. Start from HTML semantic markup, and then build up design with CSS. This should keep anyone safe. Use as rule of thumb. |
|||
|
|
|
Tables should only be used when displaying tabular data. Otherwise, they are usually a poor choice for display. |
|||
|
|
<table>then a CSS grid. I use datatables.net for a few applications and you can see a list of who uses that jquery plugin on their site. Lots of sites still use tables for good reasons. I only use tables though when working with a lot of dynamic data that needs to be sorted by column paginated etc, but not for page layouts that's what CSS is for. – Anagio Feb 28 '12 at 8:54