Chapter 6. Frames
Frames divide a browser window into several separate pieces or panes, each pane containing a separate XHTML page. One of the key advantages that frames offer is that you can then load and reload single panes without having to reload the entire contents of the browser window. A collection of frames in the browser window is known as a frameset.
The window is divided into frames much as tables are organized: into rows and columns (although they are usually relatively basic in structure). The simplest of framesets might just divide the screen into two rows, whereas a complex frameset could use several rows and columns.
In this chapter you learn the following:
How to create a frameset document with multiple frames
How to create inline frames (or iframes), which are single windows that sit within another page
How to deal with users whose browsers cannot use frames
Note
I should warn you early on that there are actually very few cases in which I would consider using frames, although this is a matter of preference and I explain my reasons why in the second section of this chapter—after a simple example that helps you understand what frames really are.
Introducing the Frameset
To help you understand frames, Figure 6-1 shows you a frameset document in a browser. This frameset divides the page into three parts, and each separate part of the page is a separate XHTML document.
Figure 6.1. Figure ...
Get Beginning Web Programming with HTML, XHTML, and CSS, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.