HTML CSS Reference/HTML Attributes Reference/target

Материал из Web эксперт
Перейти к: навигация, поиск

"target" Example

    
<HTML>
<head><Title>Example For target</Title></head>
<BODY>
<a href="http://www.w3c.org" target="_blank">W3C Consortium (blank)</a>
<br>
<a href="http://www.microsoft.ru" target="_parent">Microsoft home page (parent)</a>
<br>
<a href="http://www.yahoo.ru" target="_self">Yahoo home page (self)</a>
<br>
<a href="http://www.amazon.ru" target="_top">Amazon home page (top)</a>
</BODY>
</HTML>



target is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<a>                             <area>                        |
|                |<base>                          <form>                        |
|                |<link>                                                        |
+----------------+--------------------------------------------------------------+



target Possible Values

Possible Values
name              Document is loaded into the window or frame with the specified name (IE4+ only).
_blank            Document is loaded in a new window.
_media            Document is loaded in the HTML content area of the Media Bar (IE6 only).
_parent           Document is loaded in the parent window.
_search           Document is loaded in the browser search pane (IE5+ only).
_self             Document is loaded in the same window.
_top              Document is loaded in the topmost window for the site.



"target" Syntax and Note

Note:
    
This attribute specifies the link target for window or frame. 
If there nothing is matched, a new window is opened for the link.
    
Syntax:
    
<element target="value"> . . . </element>