Tables
can be used to format text and graphics.
| Positioning with tables
is easy. |
|
Either text or graphics |
The
HTML for the table above is shown below.
<table
align="center" width="350">
<tr>
<td colspan="2">
<font face="comic sans ms">
Positioning with tables is easy.
</font>
</td>
</tr>
<tr>
<td>
<img src="images/htmlexample3.gif">
</td>
<td>
<font face="courier">
Either text or graphics
</font>
</td>
</tr>
</table>
The
<TABLE> can have the following attributes: align="left, right or
center", border="number", width="width in pixels", height="height in pixels"
or bgcolor="colour". There are other attributes but these are not very
common.
The
<TD> tag can have the attributes: align="left, right or center",
valign="baseline, bottom, middle or top", bgcolor="colour", colspan="number",
rowspan="number", width="width in pixels" and height="height in pixels".
There are other attributes but these are not very common.
Below
is the HTML for the table above
<table
align="center" width="350" border="1" bordercolor="#ffffff">
<tr>
<td rowspan="2" bgcolor="#003366" width="25">
</td>
<td colspan="2" bgcolor="#0080C0">
</td>
</tr>
<tr>
<td bgcolor="#FFFF00" width="200">
</td>
<td bgcolor="#FF8000" height="45">
</td>
</tr>
</table>