Tables visually show relations between pieces of data. Lists do the same, but tables allow you to show multiple relations at the same time. Each cell in a table holds a number or some short text that has some relation to other data in the same column or the same row. To make it easier to see the structure of the table, rules (i.e., lines) are often added between the rows or columns (or both), sometimes only between certain groups of rows or columns. Colors and changes in font can, of course, also be used. Cells don't have margins (although there is a cell-spacing property that works in a somewhat similar way), but padding is available. CSS2 offers two ways of setting borders on cells. In one model, called collapsing borders, there is only one border between two cells; in the other, called separate borders, there are two. Depending on what "look" you are trying to achieve, and on personal preference, you may find one or the other easier to use. |