Post by Samuel on Apr 13, 2007 5:01:09 GMT -5
I find tables the most annoying things in the world,
as they always like going wrong with me, but everything
else works out perfect, so im going to give you my tutorial
of tables, with everything i can (including some complex stuff),
i am assuming you know basic html.
Tables:
ok to tell the browser that we want a table we need to add the table tag,
<table>
for our first row we add the command <tr>, standing for table row
<table>
<tr>
now we must add the columns, between these commands you place the text you want in the cell.
the command is <td> which stands for table data,
so:
<table>
<tr>
<td>Content here</td>
we can now add more columns by putting more lines of <td> e.g.
<table>
<tr>
<td>Content here</td>
<td>Content here</td>
after you have the amount of columns you want you need to close the table row </tr>:
<table>
<tr>
<td>Content here</td>
<td>Content here</td>
</tr>
you can now either:
1. Close the table with a </table> tag:
Or:
2. Carry on with more row(s):
<table>
<tr>
<td>Content here</td>
<td>Content here</td>
</tr>
<tr>
<td>Content here</td>
<td>Content here</td>
</tr>
<tr>
<td>Content here</td>
<td>Content here</td>
</tr>
</table>
Borders:
border="#"
which is the thickness of the border
cellpadding="#"
which is the space between the cell content and the border
cellspacing="#"
which is how big the gap between the cell borders and outside borders.
# is a number
Both of those are added to the <table> tag.
Making a cell as big as two rows... or the opposite
this is a simple command called span, you can use it in different
places other than tables but it is mostly used in tables.
to make a column as big as 2 rows you simply use the command:
<td rowspan="2">Content here</td>
you'd place that command as were you can see it:
<table>
<tr>
<td>Content here</td>
<td rowspan="2">Content here</td>
</tr>
<tr>
<td>Content here</td>
</tr>
</table>
and you can easily make a row as big as 2 columns by adding to the <tr> tag with: <tr colspan="2">
thank you for using Samuel's HTML Tables tutorial
any problems with this post here
thanks,
~ Samuel
as they always like going wrong with me, but everything
else works out perfect, so im going to give you my tutorial
of tables, with everything i can (including some complex stuff),
i am assuming you know basic html.
Tables:
ok to tell the browser that we want a table we need to add the table tag,
<table>
for our first row we add the command <tr>, standing for table row
<table>
<tr>
now we must add the columns, between these commands you place the text you want in the cell.
the command is <td> which stands for table data,
so:
<table>
<tr>
<td>Content here</td>
we can now add more columns by putting more lines of <td> e.g.
<table>
<tr>
<td>Content here</td>
<td>Content here</td>
after you have the amount of columns you want you need to close the table row </tr>:
<table>
<tr>
<td>Content here</td>
<td>Content here</td>
</tr>
you can now either:
1. Close the table with a </table> tag:
Or:
2. Carry on with more row(s):
<table>
<tr>
<td>Content here</td>
<td>Content here</td>
</tr>
<tr>
<td>Content here</td>
<td>Content here</td>
</tr>
<tr>
<td>Content here</td>
<td>Content here</td>
</tr>
</table>
Borders:
border="#"
which is the thickness of the border
cellpadding="#"
which is the space between the cell content and the border
cellspacing="#"
which is how big the gap between the cell borders and outside borders.
# is a number
Both of those are added to the <table> tag.
Making a cell as big as two rows... or the opposite
this is a simple command called span, you can use it in different
places other than tables but it is mostly used in tables.
to make a column as big as 2 rows you simply use the command:
<td rowspan="2">Content here</td>
you'd place that command as were you can see it:
<table>
<tr>
<td>Content here</td>
<td rowspan="2">Content here</td>
</tr>
<tr>
<td>Content here</td>
</tr>
</table>
and you can easily make a row as big as 2 columns by adding to the <tr> tag with: <tr colspan="2">
thank you for using Samuel's HTML Tables tutorial
any problems with this post here
thanks,
~ Samuel