Digital Elephant Productions

Tables vs No Tables

A great deal has been written on the web about the undesireability of tables in web pages. In fact, there is a good use for tables: wherever tabular listings are appropriate. These situations include displays of a collection of items from a database, the layout of form fields where both vertical and horizontal alignment must be maintained, and data in general spreadsheet format, whether it comes from an actual spreadsheet or not.

The use of tables purely to create margins is clumsy, and leads to problems when the viewing window size is different than the one the designer laid a table out for. This problem is better solved using CSS rules to specify the spacing directly. A variety of nice effects can be achieved in this way, and the resulting graphics survive better under changing viewport sizes than those produced by a table layout.

Last updated January 19, 2007 Webmaster