-
Your worst wet nightmare
Recognized Member
Contributions
- Notable contributions to former Help Forum
<table> = start of a table (border="1" is required if you want to show the borders!)
<tr> = start of a row
<td> = start of a cell
Enter stuff here.
</td> = end of a cell
</tr> = end of a row
</table> = end of a table
In THAT order, and nothing else.
That'll make: <table border="1"><tr><td>Enter stuff here.</td></tr></table>
Here are the (basic) things you can add in the table, tr, or td tags:
<b>border="number"</b> (only in table) = shows the border, the number represents the thickness
<b>bordercolor="colour"</b> (any tags) = shows the colour you've specified in the border.
If you apply it to table, it'll affect the whole table.
If you apply it to tr, it'll affect the whole row.
If you apply it to td, it'll affect the whole cell.
<b>cellspacing="number"</b> (only in table) = space between the first and the second cell, etc. in pixels.
<b>cellpadding="number"</b> (only in table) = space between cells and the very outer border of the table in pixels.
<b>colspan="number"</b> (only in td) = number represents how much cells it needs to cover up that certain amount of (vertical) rows. For example:
<table border="1"><tr><td colspan="2">Whatever.</td><td>Meh.</td></tr>
<tr><td>Number One.</td><td>Number Two.</td><td>Number Three</td></tr></table>
Which produces this:
<table border="1"><tr><td colspan="2">Whatever.</td><td>Meh.</td></tr>
<tr><td>Number One.</td><td>Number Two.</td><td>Number Three</td></tr></table>
<b>rowspan="number"</b> (only in td) = number represents how much cells it needs to cover up that certain amount of (horizontal) rows. For example:
<table border="1"><tr><td rowspan="2">Whatever.</td><td>NumberOne.</td></tr>
<tr><td>Cell below "Whatever".</td></tr>
<tr><td>Number Two.</td><td>Number Three</td></tr>
<tr><td colspan="2">The rest of the cell.</td></tr></table>
Which produces:
<table border="1"><tr><td rowspan="2">Whatever.</td><td>Number One.</td></tr>
<tr><td>Cell below "Whatever".</td></tr>
<tr><td>Number Two.</td><td>Number Three</td></tr><tr><td colspan="2">The rest of the cell.</td></tr></table>
<b>Note</b> that there's also colspan="2" in the tr part with "The rest of the cell". You can combine those two (colspan and rowspan) too.
Let's give another example, with both of them in one td tag:
<table border="1">
<tr><td colspan="2" rowspan="2">Wheee.</td><td>Nothing.</td></tr>
<tr><td>Nothing, either.</td></tr><tr>
<td>Again, nothing.</td><td>Guess what? Still nothing!</td></tr>
</table>
Which produces:
<table border="1">
<tr><td colspan="2" rowspan="2">Wheee.</td><td>Nothing.</td></tr>
<tr><td>Nothing, either.</td></tr><tr>
<td>Again, nothing.</td><td>Guess what? Still nothing!</td></tr>
</table>
More information here: http://www.htmlgoodies.com
<b>Read the primers first</b>, then go to the other stuff you want to learn.
<i>*phew*</i>
Last edited by Squally Leonharty; 03-28-2002 at 04:05 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules