Frames - Part 2 from Chapter 11 of HTML & XHTML: The Definitive Guide (1/4)
HTML & XHTML: The Definitive Guide, Chapter 11: Frames
[The following is a continuation of our series of excerpts from Chapter 11 of the O'Reilly title, HTML & XHTML: The Definitive Guide.]
A frame document contains no displayable content, except perhaps a message for non-frames-enabled browsers. Instead,
<frame> tags inside the one or more
<frameset> tags (which encapsulate the contents of a frame document) provide URL references to the individual documents that occupy each frame.
<frame> tag appears only within a
<frameset>. Use it to set, via its associated
src attribute, the URL of the document content that initially gets displayed inside the respective frame.
- Defines a single frame in a
- class noresize
- frameborder scrolling
- id src
- longdesc style
- marginheight title
- End tag:
</frame>; rarely included in HTML
- Used in:
Browsers place the frame contents into the frameset column by column, from left to right, and then row by row, from top to bottom. Accordingly, the sequence and number of
<frame> tags inside the
<frameset> tag are important.
The browser displays empty frames for
<frame> tags that do not have
src attributes. It also displays empty frames if the
<frameset> tag calls for more frames than the corresponding
<frame> tags define; for instance, if your frame document calls for three columns and you provide only five frames. Orphan frames remain empty, and you cannot put content into them later, even if they have a target
id for display redirection.
Created: November 18, 2002
Revised: November 18, 2002