[thelist] Table-Basics Tips

Jorah Lavin madstone at madstone.net
Sat Jul 1 09:36:10 CDT 2000

After several off-list discussions lately, I thought I'd post some "Table 
Construction FAQ."

Please feel free to expand or correct this list!

<tip type="tables basics">

*Keep 'em as simple as you can.
*Work with border="1" until everything is dandy.
*Use colspan and rowspan carefully (see rule one) you really need to count 
the cells and spans and rows carefully, and in complex tables you might 
want to get the overall table constructed using all the cells, then use the 
spans afterwards.
*Get rid of extra white space in your table... (little or no white space 
after the content of a particular cell... the closing TD tag is _right there_)
*Use "stacked" tables if you can, rather than massive complex tables.
*Don't use tables if you don't have to. (see rule one) I see people using 
tables when all they need is a {div align="center"} tag.
*If you are new to tables, use a sheet of grid paper or a drawing program 
to sketch out the structure first.
*In a complex page with multiple tables, do your future self a favor and 
comment the markup heavily.  A year later that source will be a _lot_ 
easier to figure out if you have comments showing where each table starts 
and stops and what it is there for.



More information about the thelist mailing list