Using Tables - Examples
Using Tables - Examples
The following examples can be seen on this page:
- 1 row, 2 column table
- 2 row, 3 column table
- 3 row, 3 column table
Example 1: Simple 1 row, 2 column
table
<table width=400 align="center" > <tr>
<td> This is my first column</td> <td> <font
size="2">This is my second column</font><//td> </tr>
</table>
This displays as follows:
|
This is my first column |
This is my second column |
Example 2: Simple 2 row, 3 column
table
<table width=400 border="2"> <tr>
<td> This is my first column which is a long sentence which couldnt
fit on one line and should have to "wrap" around to the next line</td>
<td> This is my second column which is a long sentence which
couldnt fit on one line and should have to "wrap" around to the next
line</td> <td> This is my third column which is a long
sentence which couldnt fit on one line and should have to "wrap" around
to the next line</td> </tr> <tr> <td>
This is my first column (second row) which is a long sentence which
couldnt fit on one line and should have to "wrap" around to the next
line</td> <td> This is my second column (second row) which is
a long sentence which couldnt fit on one line and should have to "wrap"
around to the next line</td> <td> This is my third column
(second row) which is a long sentence which couldnt fit on one line and
should have to "wrap" around to the next line</td> </tr>
</table>
This displays as follows:
|
This is my first column which is a long sentence which
couldnt fit on one line and should have to "wrap" around to the next
line |
This is my second column which is a long sentence which
couldnt fit on one line and should have to "wrap" around to the next
line |
This is my third column which is a long sentence which
couldnt fit on one line and should have to "wrap" around to the next
line |
|
This is my first column (second row) which is a long sentence
which couldnt fit on one line and should have to "wrap" around to the
next line |
This is my second column (second row) which is a long sentence
which couldnt fit on one line and should have to "wrap" around to the
next line |
This is my third column (second row) which is a long sentence
which couldnt fit on one line and should have to "wrap" around to the
next line |
Example 3. (3 row, 3 column table with the 3
columns of the first row "spanned")
<table width="300" border="1"> <tr> <td
colspan="3">3 columns are spanned here</td> </tr>
<tr> <td> </td>
<td> </td> <td> </td>
</tr> <tr> <td> </td>
<td> </td> <td> </td>
</tr> </table>
This displays as follows:
|
3 columns are spanned here |
| |
|
|
| |
|
|
|