Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
target
a
b
c
cx
cy
d
dx
dy
e
f
fx
fy
id
in1
in2
k1
k2
k3
k4
r1
r2
x
x1
x2
y
y1
y2
z
Collapse the table of content
Expand the table of content

target attribute | target property

Specifies where to open a linked document.

Scalable Vector Graphics: Linking, Section 17.2Internet Explorer 9

 

Syntax

HTML
<element target="p" ... >

 

JavaScript
p = object.target

 

Property values

Type: Object

One of the values in the Property Values section.

Standards information

Remarks

The target property specifies the name or portion of the target window, frame, pane, tab, or other relevant presentation context (that is, an HTML or XHTML frame, iframe, or object element) where a document is opened when the link is activated.

Use target when there are multiple possible targets for the ending resource, such as when the parent document is a multi-frame HTML or XHTML document.

Examples

The following code example shows the default and _blank behaviors of the target property.


<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
 "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
  
<svg width="5cm" height="7cm" viewBox="0 0 5 7" version="1.1"
     xmlns="http://www.w3.org/2000/svg" 
	 xmlns:xlink="http://www.w3.org/1999/xlink">
	 
  <desc>Two basic link types.</desc>
	
  <!-- Outline the SVG viewport. -->
  <rect x="0" y="0" width="100%" height="100%" 
        fill="none" stroke="blue"  stroke-width=".03"/>
		
  <a xlink:href="http://www.w3.org">
    <ellipse cx="2.5" cy="1.5" rx="2" ry="1" fill="red" />
  </a>
	
  <a xlink:href="http://dev.w3.org/SVG/profiles/1.1F2/publish/" target="_blank">
    <ellipse cx="2.5" cy="4.75" rx="2" ry="1" fill="green" />
  </a>
</svg>

See also

SVGAElement

 

 

Show:
© 2015 Microsoft