Frames - Part 2 from Chapter 11 of HTML & XHTML: The Definitive Guide (1/4) | WebReference

Frames - Part 2 from Chapter 11 of HTML & XHTML: The Definitive Guide (1/4)

current pageTo page 2To page 3To page 4
[next]

HTML & XHTML: The Definitive Guide, Chapter 11: Frames

Frame Contents

[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.

The <frame> Tag

The <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.


<frame>

Function:
Defines a single frame in a <frameset>
Attributes:
bordercolor name
class noresize
frameborder scrolling
id src
longdesc style
marginheight title
marginwidth
End tag:
</frame>; rarely included in HTML
Contains:
Nothing
Used in:
frameset_content

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 name or id for display redirection.


current pageTo page 2To page 3To page 4
[next]

Created: November 18, 2002
Revised: November 18, 2002

URL: http://webreference.com/authoring/languages/html/definitive/2/