thedigitalfeed.co.uk content
thedigitalfeed.co.uk/Code
"W3C standards are totally useless"
Posted on Thursday the 8th of December, 2005
www.thedigitalfeed.co.uk/code/2005/12/08/w3c-standards-are-totally-useless
I came across a website (decloak.com) the other day that, amongst other things, provides a 16-point list of arguments for designing web pages using tables instead of CSS. I thought that the arguments were particularly flawed and uninformed. I felt I had to make a rebuttal against these ignorant allegations, so I've broken down some of the more major points here.
I'm going to pick major points and arguments from this site and have my say about them. So let's begin:
Firstly, nobody is suggesting you replace every single table cell with CSS-formatted divs. Tables have not been depreciated - they still exist in the W3C Standard. They exist for good reason - for displaying tabular data.
Originally, web pages were built with support for coloured text, font sizes, tables and a few other basic formatting techniques. When images were introduced, people soon realised that they could hack tables to build fairly complex designs and, because of this, further options (such as cell backgrounds) were introduced. But they were still based on a hack because there was no better option.
CSS attempts to seperate design and content, and it does a pretty good job. With a well-structured CSS page, if you take the design away, the content is still readable and well-organised. This has many benefits such as accessibility and support for small-screen devices which may want to apply their own CSS formatting because of the size of the display (the Opera browser supports CSS overrides for this reason).
Furthermore, if your site can be read without layout, it can be better understood by search engines - and that can be no bad thing!
I design database-driven websites for a living. Of course databases make storing data (and providing content-management systems and various other applications) very quick and painless. Yes, content is stored in a database for later retrieval. But why does that suggest that a table would be better suited for layout?
There are two ways to build a table for content storage. One way is to give each record a data cell for each part of the page (title, content, permissions etc). In this scenario, each cell holds data of a specific type (integer, text etc) depending on its usage. However, not all data in the record actually appears on the page - a lot of the cells hold data for working with conditional logic (ie. if 'authorisation' is set to 1, you need to be logged in to view the page). This has absolutely no bearing on the layout of the page. The two are not linked.
I personally build my database tables in a different way, and stack them vertically rather than horizontally. This means that I have one record for each aspect of a page and an identifier field so that I can link them together. Does that mean that I should be displaying my data vertically on-screen? I know. It doesn't make any sense to me either.
Displaying tabular data (for example accounting figures) is exactly what tables are for. But just because data is held in a table does not mean that it should be displayed in tables. That depends entirely on the usage of the data.
I'm going to pick major points and arguments from this site and have my say about them. So let's begin:
Are they any benefits to using a fully CSS integrated solution (css tables or CSS-P)?
No. There is no "real-life" or practical benefits when you start to replace each-and-every-single <table> tag with <div> tags and attempt to use full CSS to display your webpages properly across popular browsers.
Firstly, nobody is suggesting you replace every single table cell with CSS-formatted divs. Tables have not been depreciated - they still exist in the W3C Standard. They exist for good reason - for displaying tabular data.
Originally, web pages were built with support for coloured text, font sizes, tables and a few other basic formatting techniques. When images were introduced, people soon realised that they could hack tables to build fairly complex designs and, because of this, further options (such as cell backgrounds) were introduced. But they were still based on a hack because there was no better option.
CSS attempts to seperate design and content, and it does a pretty good job. With a well-structured CSS page, if you take the design away, the content is still readable and well-organised. This has many benefits such as accessibility and support for small-screen devices which may want to apply their own CSS formatting because of the size of the display (the Opera browser supports CSS overrides for this reason).
Furthermore, if your site can be read without layout, it can be better understood by search engines - and that can be no bad thing!
TABLES are for TABULAR DATA and not meant for Web Page Layout where as CSS is more suited for this.
Last time I checked, most websites use a database to store data. And databases are just a bunch of tables in the first place. Hence, tabular data that will somehow be eventually displayed back onto a webpage in some type of tabular form that has at least 2 columns and 2 or more rows..
And, as far as I know, the shopping cart has at least 2 columns, the name of the product and the price. (But it's usually more than two columns: description, quantity, etc). But I want to point out to CSS elitists that this shopping cart is not a block of text, or a paragraph.
I design database-driven websites for a living. Of course databases make storing data (and providing content-management systems and various other applications) very quick and painless. Yes, content is stored in a database for later retrieval. But why does that suggest that a table would be better suited for layout?
There are two ways to build a table for content storage. One way is to give each record a data cell for each part of the page (title, content, permissions etc). In this scenario, each cell holds data of a specific type (integer, text etc) depending on its usage. However, not all data in the record actually appears on the page - a lot of the cells hold data for working with conditional logic (ie. if 'authorisation' is set to 1, you need to be logged in to view the page). This has absolutely no bearing on the layout of the page. The two are not linked.
I personally build my database tables in a different way, and stack them vertically rather than horizontally. This means that I have one record for each aspect of a page and an identifier field so that I can link them together. Does that mean that I should be displaying my data vertically on-screen? I know. It doesn't make any sense to me either.
Displaying tabular data (for example accounting figures) is exactly what tables are for. But just because data is held in a table does not mean that it should be displayed in tables. That depends entirely on the usage of the data.