Quick Vocab
Row- Goes from left to right.
Column- Goes from top to bottom.
Cell- The actual box thing you put things in. Sort of like a coordinates (lol).
Well first of all, you have to start by adding this code:
<table>
This is the main tag, just like an "a" tag for links, or a "img" tag for images. In it is where you would put all the things like background colors, width & height, border, ect. Here's a list (using a table, lol) of things you can put in the "table" tag.
*Replace the capitalized words w/ whatever u want. This isn't the only stuff u can put in, but until u get use to tables, it's all u'll really need.
Next, you have to add the "row" tag:
<tr>
Just like the "table" tag you can customize your rows with the codes above, however they only only affect that specific row.
Finally the columns, which is basically the cell where you put in all the stuff. Remember, u can also use the codes in the table, but this will only affect that specific cell.
<td>
Once you put in the "td" you're ready to put all the content, or whatever you want to put in. When finished with that you have to close the cell by putting this:
</td>
If you want more than one cell in a row then you repeat that last step and add as many "td"s and "/td"s as you want.
Afterwards you have to close the row by putting a:
</tr>
Again if you want more than one row, add as many more "tr" tags as you want.
Finally, once done with everything you have to close the table by putting this:
</table>
If you followed the steps from above, the table you made should look something like this (unless you changed the colors and all that).
BLAH BLAH |
The code would be:
BLAH BLAH |
You can aslo make one column two or more rows, or make a row two or more columns. You'd do that by adding this to the "td" tag:
rowspan=2 - to make a column take up 2 rows
colspan=2 - to make a row take up 2 columns.
You can change the 2 to any number you want, that stands for how many rows or columns you want.
Example:
|
| |||||||||||||
Code: |
Code: |
These are just the actual layout of some tables, not with the colors or anything. And they're not that small, i just did it that way so that it doesn't take too much space. If you put a lot of stuff in it, it will become bigger (duh).
* The letters are there to tell you which cell that is.
No Row Borders
A | B | C |
D | E | F |
G | H | I |
Code
No Inside Borders
A | B |
C | D |
Code
No Column Borders
A | B |
C | D |
E | F |
Code
A | B | C | D |
E | F | G | |
H | I | ||
J | K | L | M |
Code
A A A | ||
B B B B | C | |
D |
Code
You can do a lot of things with tables. Be creative with tables, experiment and add stuff to them. If you make something cool or just need help with tables, contact me.