Search the site








Using Tables: Lesson 1 - The Basics

So far, we have been looking at how to design a Web page using HTML tags - all of which probably seem fairly primitive compared to a DTP package or even a word processor. You have little control over where elements are placed, and those which you can control seem to require a considerable amount of work.

One means of adding extra flexibility to your Web pages is to use tables. The obvious use for these is to display tabulated information, where you want to include a series of pieces of information. However, tables can be used for much more than this, and the ability to place text, images, hyperlinks and even forms into a table cell means that they can be used for more advanced DTP effects on your Web page.

Why Use Tables?

As we've already mentioned, tables can be used to arrange information in columns and rows, but the best use of them is for DTP effects. As you can include different components - hypermedia, text, links and so on - you can create quite complex interactive pages. Furthermore, as you can use borders (invisible or visible) around each cell, and don't have to fill up every cell, you can really go to town on setting out a page by forcing HTML to position elements where you want them.What's more, as you don't have to use gridlines, your audience need never know that you are using tables.

First Steps

The first steps for using a table are the <TABLE></TABLE> tags surrounding everything that you want to include in your table.

Within the table, rows are flagged by <TR></TR> tags (for table row) and <TD></TD>. It is quite easy to become confused when creating a table, but the most important tags are these three: remember that you need to include TD tags within TR ones, that is you create as many cells within each row as you require.

For the following exercises, you will need to download the images used in the hypermedia lesson. Create a directory or folder named tables and another directory within it called images where you will save the images.

Lesson 1 Lesson 2 Lesson 3 Lesson 4
Lesson 5 Lesson 6    

 


© Jason Whittaker 2000-04



You can order copies of the following books:
Web Production for Writers and Journalists in paperback.
The Internet: The Basics in paperback.
The Cyberspace Handbook in paperback.