Site hosted by Angelfire.com: Build your free website today!
Basic Table Codes



Here are the basics to creating tables. The codes for each of the tables shown is located below the table for you to copy and paste into your HTML document.




This is a pretty basic table


Here is the code to that basic table -

<TABLE BORDER=2> <TR> <br> <TD>Text/image/link/whatever would go here</TD> <br> </TR> <br> </TABLE><BR>

Yeah, that was too easy. Let's get a little bit harder by making the border of the table zero.



This is a Borderless Table



Here's the code to the borderless table.
<TABLE BORDER=0> <TR> <br> <TD>This is a Borderless Table</TD> <br> </TR> <br> </TABLE><BR>

You can make the border whatever you want. Borderless tables have little meaning unless you're ordering words or images in a specific order. Speaking of images, how about putting a image in a table.

Here is a image inside of a table.


Here is the code for the image inside of the table.
<TABLE BORDER="10" > <TD ALIGN="center"> <IMG SRC="http://members.aol.com/HTMLisEZ/button.gif"> </TD> </TABLE>

Note that just like the original two tables, you can change the border to what ever you want. I used a border of 10 for the image above.

Alright, now we're getting somewhere. How about muli-celled tables. In other words, you have lots of data. Below is an example.
A B C
D E F


The code for that table is below.
<TABLE BORDER CELLPADDING=10 CELLSPACING=0> <TR> <TD>A</TD> <TD>B</TD> <TD>C</TD> </TR> <TR> <TD>D</TD> <TD>E</TD> <TD>F</TD> </TR> </TABLE>

Now the borderless table comes in handy. Let's make the above table borderless.
A B C
D E F

The code for that table is below.
<TABLE BORDER=0 CELLPADDING=10 CELLSPACING=0> <TR> <TD>A</TD> <TD>B</TD> <TD>C</TD> </TR> <TR> <TD>D</TD> <TD>E</TD> <TD>F</TD> </TR> </TABLE>