Using Frames to layout page content

In the mid 1990’s using frames were very popular for controlling for page layout. Unfortunately frames present real problems for disabled users. For visual users these frames organised the content of a page into different zones that are each, in practice, separate web pages. However screen readers and text only browsers can only work with one page (frame) at a time so the relationship between the frames is lost.

In essence frames work by using a combination of separate HTML files to compose a single visible page. The first document contains the declaration and calls the various documents (frames), until the combination of documents forms the intended page as displayed in the browser window. The benefit of this approach is that each of the individual components (frames) can be replaced leaving the structural set of frames, such as the banner and navigation bars, in place. This makes it easier for the web engineer to create a dynamic site that maintain a consistent look and feel. It also means that individual frames can be scrolled up and down whilst leaving the surrounding frames static.

For example, if we take our simple page layout  (shown below) we could create the same look using four separate documents. We need the basic frame setting document and the three frame documents that make up the parts of the page.

Frame B

Navigation
Bar

Frame C

Page content

 

 The main disadvantage of this method is that each page contains four (or more) separate HTML documents. A blind user will not get an overview of the whole document. Instead the user can only read one frame at a time. If they want to move from the navigation frame to the content frame they have to load a new document. Almost everything that frames can do can CSS can do better.

The other disadvantages of using frames are:

  • Frames are not expected to be supported in future versions of HTML
  • Frames are difficult to use. (Printing the entire page is difficult).

  • The web developer must keep track of more HTML documents

So if you are creating new content please avoid using frames. If your existing content uses frames then please make sure that each frame has a unique title that explains its relationship to the page as a whole. Also make sure that you provide a <noframes> alternative for browsers that do not work well with frames.