Building a Frameset

Frames divide the browser window space into two dimensions: horizontally in rows and vertically in columns. Each portion of the window space, the frame, is defined by its size. Sizes are set in fixed measures of pixels, by a percentage of the available space, or by relative sizing.

One of the simplest framesets to create is to divide the browser window into four equal quadrants. The basic syntax looks like this:

<frameset rows="50%, 50%" cols="50%, 50%">
</frameset>

The frameset element, then, provides the spatial relationship between each frame. However, you still need to populate each frame with content documents. To do this, each defined space will need its own frame element:

 <frameset rows="50%, 50%" cols="50%, 50%"> ...

Get XHTML by Example 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.