That kind of linking is great when you want to link together pages in your site. But what if you want to link to something outside your site? Let's add another link to Beth's page.
<html>
<head>
<title>My Framz Page</title>
</head>
<body>
Beth
<p>You have to visit my friend <a href="shannon.html" target="WINDOW-1">Shannon</a>
<p>And of course you have to visit Joe at
<a href="https://www.htmliseasy.com/" target="WINDOW-1">HTMLisEasy.com</a>
</body>
</html>
As you can see, this causes someone elses page to load into your frame.
How can you make an outside link load into the full browser window? Easy, change the target to _top. (Note that was in lower case... very important.)
<html>
<head>
<title>My Framz Page</title>
</head>
<body>
Beth
<p>You have to visit my friend <a href="shannon.html" target="WINDOW-1">Shannon</a>
<p>And of course you have to visit Joe at
<a href="https://www.htmliseasy.com/" target="_top">HTMLisEasy.com</a>
</body>
</html>
Always use this method when linking to an outside page. Believe me, your viewers will appreciate it!
_top is one of 4 so-called 'magic targets'. They are _top, _blank, _self and _parent. These are the only targets that can begin with something other than an alpha-numeric character. In addition, any target beginning with an underscore_ that is not one of the 'magic targets' may behave unpredictably.
What exactly do those 4 magic targets do?
_top opens a link in the full browser window.
_blank opens a link in a new browser window.
_self opens a link in the same browser window or frame. (Default. Same as not specifying target.)
_parent opens a link in the immediate frameset parent.
It is commonly thought that _new will open a link in a new window. With most browsers it probably will. So will _tom, _dick or _harry. For that matter so will bonnie and clyde. Any target that is not defined somewhere will probably result in a new window opening up.
Once again, remember, when using one of the four magic targets, _top, _blank, _self or _parent, make sure they are lower case. UPPER case won't be understood and the end result will probably be the link opening in a new window.
Frames Tutor |
Lessons: Intro 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
Frames Templates HTML 4.0 Reference Barebones HTML Guide |
![]() |