Tables

Now, say you had an image, and you wanted to cut it up and put text around it. How would you align it all correctly? The simplest way would be with a table, because you can make the table itself invisible. An example:

border="1"

text goes here

border="0"

text goes here

There are two tables above. They are both exactly the same, except the border of the first one is set to 1, and the border of the second is set to 0.

There are four cells in the table. Three contain images, and one contains text. First you'd need to cut up an image in a graphics editor, then you would need to build a table to hold the parts of the image together. This is what the code for the above table looks like:

Now, because there are two columns in the middle row, we put colspan="2" in the top and bottom rows. We also have the height and width of each cell the same as the height and width of the image that is in that cell. This is so there are no gaps between the images.

Using tables with images is also useful if the image is a big one that takes too long to download. Cutting it up into smaller parts will speed up the loading time.