Frames - Part 3 from Chapter 11 of HTML & XHTML: The Definitive Guide (3/4)
[previous] [next] |
HTML & XHTML: The Definitive Guide, Chapter 11: Frames
Special Targets
There are four reserved target names for special document-redirection actions:
- _blank
- The browser always loads a
target="_blank"
linked document into a newly opened, unnamed window. - _self
- 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 thetarget
attribute in the<base>
tag in a document's head (see section 11.7.3). - _parent
- 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
_self
. - 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
_parent
is specified, the document is loaded into the area occupied by the three-column frameset containing the frame that contains the link. - _top
- 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
_top
would remove all the contained frames and load the document into the entire browser window.
Figure 11-8: Using special hypertext targets in nested frames and framesets
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 name
or id
you define in your documents.
[previous] [next] |
Created: November 25, 2002
Revised: November 25, 2002
URL: https://webreference.com/authoring/languages/html/definitive/3/3.html