Click to See Complete Forum and Search --> : To use Tables, or not to use tables... that is the question


Sux0rZh@jc0rz
10-19-2003, 08:26 PM
I'm wondering, why is it bad to use tables for layout? I hear it's a bad thing, but have no clue WHY.

PeOfEo
10-19-2003, 09:49 PM
Anyone have a link to that professors css thing that explains why css is better while we are on the subject? Css is better then tables in many ways. For one css can be put in an external file so the layout has to be done only one time. This will save your bandwidth a whole lot in the long run. Tables also cludder up your code. Tables are incosistant. Tables fair poorly on older browsers like ns 3 and 4. Those are jsut a few of the numerous reasons why css is better for layout then tables.

Jona
10-19-2003, 10:15 PM
First, the WCAG 1.0 (http://www.w3.org/TR/WCAG10/) states that tables should be used exclusively for tabular data--not layout. Second, CSS (http://www.w3.org/TR/CSS2) is much better for formatting objects and making nice sites than tables. Tables are messy, and you can't change much of anything without editing HTML code. With CSS, you can edit the entire layout of the site by simply changing one, single line of code (which links to a .css file to load into the document). CSS is better for accessibility as well, as some users enjoy browsing without CSS support, and your HTML should be set up to be readable without CSS support or JavaScripting support. A few good sites to look at are... http://rickbull.co.uk/ and a lot of the links below (in my signature) have to do with accessibility.

[J]ona

Sux0rZh@jc0rz
10-19-2003, 11:18 PM
ahh. I never used tables for layout, just wondered why everyone was capping on them. (I only use them for tabular data!)

Thank you for updating my "Web-Design Knowledge Database". Your contribution will go to help the needy. (ok, mayby not the starving babies in africa, but it will help kid's like me.)

Charles
10-20-2003, 05:15 AM
From the HTML 4.01 Specification:
Tables should not be used purely as a means to layout document content as this may present problems when rendering to non-visual media. Additionally, when used with graphics, these tables may force users to scroll horizontally to view a table designed on a system with a larger display.
http://www.w3.org/TR/html4/struct/tables.html#h-11.1