Size of the table
There
are two ways to specify the size, it can either be relative (depending
on the width of the browser window, size is given in percentages) or absolute
(size is given in pixels). These values can also be combined, one direction
in pixels, the other in percentage. Within the first <table> tag
the width="x" and height="y" values have to added.
Example:
<table width="200" height="50%">
An example:
<table border="5" cellspacing="5" cellpadding="5"
width="100">
<tr>
<td>content</td>
<td>of</td>
<td>
this</td>
</tr>
<tr>
<td>table</td>
<td>is</td>
<td>
all</td>
</tr>
</table>
The result
content |
of |
this |
table |
is |
all |
Alignment of the content
of the cells
The
content of a cell can be aligned horizontally in three ways: align="left",
align="center" or align="right". In vertical direction
we too have three options: valign="top", valign="middle"
and valign="bottom". In total it gives us nine possible positions.
Depending on in which <tag> the align options are placed it will
align the whole table <table align="right" valign="middle">,
the contents of all cells in a row <tr align="center" valign="top">
or of a single cell <td align="left" valign="bottom">.
If no values are added to the tags, the browser's default stting will
be taken.
An example:
<table border="5" cellspacing="5" cellpadding="5"
width="200" >
<tr
align="left" height="100">
<td
valign="top" >content</td>
<td
valign="middle" >of</td>
<td
valign="bottom" > this</td>
</tr>
<tr>
<td
align="left">table</td>
<td
align="center" >is</td>
<td
align="right" > all</td>
</tr>
</table>
The result:
content
|
of |
this |
table |
is |
all |
Action
Go
to the HTML file of "lovelyMaps" and play around with different
settings...
|