<a href="" target="">
Browser |
|
---|---|
Type |
The target attribute of the A element specifies the target frame of the link.
<a href="index.html" target="_top">linked text</a>
Attribute | Value | Explanation |
---|---|---|
target=" " | _blank | the linked page opens in the new window |
_top | the linked page opens in the entire window | |
_self | the linked page opens in the same frame | |
_parent | the linked page opens in the parent frame | |
frame name | the linked page opens in the named frame |
Example
<p><a href="example_t01.html" target="_top">Entire window</a></p>
- Output
-
<p><a href="example_t02.html" target="_self">Same frame</a></p>
- Output
-
<p><a href="example_t03.html" target="_parent">Parent frame</a></p>
- Output
-
About the parent frame
When you load the "child.html" into the B frame, the parent frame of the C frame becomes the B frame.
<ul>
<li><a href="example_t04.html" target="top">B frame</a></li>
<li><a href="example_t04.html" target="main">C frame</a></li>
</ul>
- Output
-