The simplest 3x3 table markup is shown below (after this, I will not show markup for the examples; look at the page source):
<TABLE BORDER="1"> <TR> <TD> A1 </TD> <TD> A2 </TD> <TD> A3 </TD> </TR> <TR> <TD> B1 </TD> <TD> B2 </TD> <TD> B3 </TD> </TR> <TR> <TD> C1 </TD> <TD> C2 </TD> <TD> C3 </TD> </TR> </TABLE> |
The rendering is like this:
|
So you can see that basic table markup is actually quite straightforward and clear. The BORDER tag on the TABLE element controls the size of the table grid lines in pixels. You can eliminate the border by setting the value to 0, but it is better to leave it in until you have finished markup. I will be showing all the table examples with BORDER=1. Table rows use the TR element and the table cells use the TD element. The end tags on TR and TD are optional, but often Netscape Navigator gets confused if you leave them out.
If you want a cell to appear empty, place a non-breaking space ( )
in it.