target

Jump to: navigation, search

target

This page has been flagged with the following issues:



Summary

Target is a link attribute, which defines where to open the link.


Applies to http://docs.webplatform.org/wiki/html/elements/a

Target is a link attribute that defines in what window a link will open.

Examples

A target value of "_blank" will cause the page to open in a new window.

HTML

<a href="#" target="_blank">Link Text</a>

A target value of "_self" will cause the page to open in the same window or frame.

HTML

<a href="#" target="_self">Link Text</a>

A target value of "_parent" will cause the page to open in parent frame of the element.

HTML

<a href="#" target="_parent">Link Text</a>

A target value of "_top" will cause the page to open in the top-most frame.

HTML

<a href="#" target="_top">Link Text</a>

Notes

Remarks

The window name is an optional argument in the open scripting method. If there is no existing window or frame with the same name as specified in the target, a new window is opened with a name equal to the value of the target.

Syntax

Compatibility

Desktop

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support ? ? ? ? ?

Mobile

Feature Android BlackBerry Chrome for mobile Firefox Mobile (Gecko) IE Mobile Opera Mobile Opera Mini Safari Mobile
Basic support ? ? ? ? ? ? ? ?

See also

Related pages (MSDN)

  • a
  • area
  • base
  • form
  • link

Attribution

This article contains content originally from external sources.

Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]