Name
TARGET — NN n/a IE n/a HTML 4
Synopsis
TARGET=”windowOrFrameName"Optional
If the destination document associated with the
HREF attribute is to be loaded into a window or
frame other than the current window or frame, you can specify where
the destination document should load by assigning a window or frame
name to the TARGET attribute. Target frame names
must be assigned to frames and windows as identifiers. Assign names
to frames via the NAME attribute of the
FRAME element; assign names to new windows via the
second parameter of the window.open() scripting
method. If you omit this attribute, the destination document replaces
the document containing the link. This attribute is applicable only
when a value is assigned to the HREF attribute of
the element.
If this feature is implemented in future browsers, the
DIV element will probably have only one
destination document and one target (like the A
element). If you want a link to change the content of multiple
frames, you can use a DIV element’s
onClick event handler or a
javascript: pseudo-URL to fire a script that loads
multiple documents. Set the location.href property
of each frame to the desired URL.
Example
<DIV TARGET="display" HREF="chap3.html#sec2">...</DIV>
Value
Case-sensitive identifier when the frame or window name has been
assigned via the target element’s NAME
attribute. Four reserved target names act as constants:
-
_blank Browser creates a new window for the destination document.
-
_parent Destination document replaces the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access