Frames - Part 3 from Chapter 11 of HTML & XHTML: The Definitive Guide (3/4)
HTML & XHTML: The Definitive Guide, Chapter 11: Frames
There are four reserved target names for special document-redirection actions:
- The browser always loads a
target="_blank"linked document into a newly opened, unnamed window.
- This target value is the default for all
<a>tags that do not specify a target, causing the target document to be loaded and displayed in the same frame or window as the source document. This target is redundant and unnecessary unless used in combination with the
targetattribute in the
<base>tag in a document's head (see section 11.7.3).
- This target causes the document to be loaded into the parent window or frameset containing the frame containing the hypertext reference. If the reference is in a window or top-level frame, then it is equivalent to the target
- A brief example may help clarify how this link works. Consider a link in a frame that is part of a three-column frameset. This frameset, in turn, is a row in the top-level frameset being displayed in the browser window. This arrangement is shown in Figure 11-8.
- If no target is specified for the hypertext link, it is loaded into the containing frame. If a target of
_parentis specified, the document is loaded into the area occupied by the three-column frameset containing the frame that contains the link.
- This target causes the document to be loaded into the window containing the hypertext link, replacing any frames currently displayed in the window.
- Continuing with the frame hierarchy, as shown in Figure 11-8, using a target of
_topwould remove all the contained frames and load the document into the entire browser window.
All four of these
target values begin with the underscore character. Any other window or target beginning with an underscore is ignored by the browser, so don't use the underscore as the first character of any frame
id you define in your documents.
Created: November 25, 2002
Revised: November 25, 2002