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 SPAN 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 SPAN 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 a desired URL.

Example

<SPAN TARGET="display" HREF="chap3.html#sec2">...</SPAN>

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

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.