Frames vs. Tables

This should be a fun topic because it's very interactive and quite tutorial in nature. It reviews by example the two basic structures of a web page, frames  or tables, similar in some ways and quite different in others. Whether to use of tables or frames is one of the first decisions you'll be making when you begin designing your web.

Your decision will make a technical commitment to the structure of your web and it's quite important to know the pros and cons of the two diverse approaches. So ... let's have a look..

We're now going to rebuild Sam's Web Stop which is based totally upon frames, and then we're going to do it again using tables instead. I personally am quite curious to see how similar they end up looking. You see, I'm a 'frames bigot' and have never actually built a table based web site.

The way we'll do this is to create a new window in your browser and then take that window through a series of processes. The page you're now looking at will lurk in the background.

OK, you know what to do next.

I hope you found that exercise informative, as well as amusing. It's pretty clear that frames go a long way toward simplifying the navigation of a web site. The negative esthetics of the scroll bar is worth considering, however, if you're trying to match the backgrounds of the toc and banner frames. A variation on this theme might have been to match the colors of the main and banner frames instead. In this case, scroll bars would not have been too distracting. Something like the following might be more to your liking.

Let's now see how we might do this using tables to hold all the page elements together, instead of frames doing it. Then we'll come back here and wrap up this topic. 

So, what can we conclude from these exercises? Who wins, tables or frames?

Well, after going through this, I'm still a frames bigot, but that doesn't mean you have to be. I think what really has me hooked it that I only have to write one banner page and one toc page for the entire web site. Making changes to either of those is really a snap and only done in one place. Also, I really like having the navigation tool present at all times. I think I'll just have to live with the cosmetics of the scroll bar, but I'll always try to contain the vertical size of that frame to minimize scrolling.

If you should opt for the table version, there are two major drawbacks to keep in mind:

1. Every time you change the navigation tool, you will have to make that same change to every page of your web site. Some editors have features to do this for you. FrontPage 2000 has 'shared borders' and a friend told me Dreamweaver has a similar feature called templates. However, you're now making a commitment to the continued use of that editor! Another way to avoid this problem is to use a navigation tool like mine which reads in its navigation text from a single file. If you want to see mine, click here.

2. If you retrieve data or a page from another location of your web site or from a remote location, you can specify a 'target' parameter to place it in your page, usually main. I'm not sure how I would handle this without frames. Probably I'd try to write some Javascript to pop up a smaller window and try to bring that page into it, or more easily, just open a whole new browser window in HTML. However, you may not want a whole full size window covering your own. Always a tradeoff, eh?

I hope you've enjoyed this topic as much as I had writing it. If you have any thoughts on this which may be helpful, perhaps something I've overlooked, send me feedback. I'm always open to changing this section.