Everything you know about CSS is wrong
22nd Oct 2008
Rachel Andrew explains about CSS tables and why HTML tables for layout will be a thing of the past when IE8 is finally released.
The
tableelement in HTML is a semantic structure: it describes what data is. Therefore, you should only use thetableelement if the data you are marking up is tabular—for example, a table of financial information. If it would normally be stored in a spreadsheet on your computer, it probably needs marking up as a table in HTML.The
tablevalue of thedisplayproperty, on the other hand, is simply an indiÂcation of how something should look in the browser—it has no semantic meaning. Using atableelement for your layout tells a user-agent, “This data is tabular.†Using a bunch ofdiv@s that have the @displayproperty set totableandtable-cellsays nothing to that user-agent other than asking it to render them visually in a certain way, if it’s capable of doing so.Rachel Andrew









