TABLES EXERCISE



To make your page a little more interesting to look at, we're going to use a table. Have a go at the following:

Create a table, that starts at the very top of the page, excluding the anchor tag there, and spans across the whole width of the page. We want to make it so that there are three cells in the first table row. So create a table with no borders, but with cellpadding of about 8 pixels. Leave the alignment to default.

Now in the first table row, create a cell that is 10% the width of the page, and set it's background to a colour of your choice. I recommend a light colour, that's easy on the eyes. Now define another cell, into which all the information on your page should go, apart from the "End of Page" text, and the "Back to Top of Page" link. Leave this cell with default background colour. Then create a third cell which you should make identicle to the first cell.

Now you want to create a new table row, and in that table row, create a singe cell that spans across the whole table, and in this cell, you should put the bits of your page that didn't go into the cell above. Now set the colour in this cell to be something else, that hopefully complements the other colours.

Now feel free to adjust the sizes of the table cells until you think that they're right for your page. You may also find, that the first and last cells in the first row don't come out the colour you want them to. In this case, it is necessary to put something between the TD start and end tags. I recommend:

 

Which is a non-breaking space, and shouldn't cause any problems with the table.



Here is what your document should look something like. To see how the page is made, view the document source - generally done by using the "View", "Document", or "Page" menus on your browser.