CS403 Table Example 1


Basic Table 1
R1C1 R1C2
R2C1 R2C2
This is a simple 2 X 2 table with just the basic tags: <table>, <tr>, and <td>. (I have also included the optional <caption> tag to identify it as Basic Table 1.)


Basic Table 2
R1C1 R1C2
R2C1 R2C2
This is another simple 2 X 2 table with the same basic tags: <table>, <tr>, and <td> but this time we have included the border attribute in the <table> tag in order to see the partitions.


Basic Table 3
supercalifragilisticexpialidocious R1C2
R2C1 R2C2
This is the same table as directly above except that we have replaced the contents of the first cell (R1C1) with a very long word - notice that the cell accommodates the contents by becoming larger.


Basic Table 4
R1C1 R1C2
R2C1 R2C2
A simple 2 X 2 table that is made to be 60% the width of the page using the width attribute in the <table> tag.


Basic Table 5
R1C1 R1C2
R2C1 R2C2
The same 2 X 2 table but with <th> tags in the first row instead of <td> tags.



Valid XHTML 1.0! Valid CSS!