|
Targeting your linksYou can make your link open a new window or in the same window, etc. You will use the variable target="" in the <a> tag.
If there is no target="" variable, the page will open in the same window. Or, if you want to use the target variable, you can use
target="_self" and the linked page will appear in the same window/frame that the link is located in. Please note that if you are using frames
this variable will open the linked page in the current frame that the link is located in and not the whole page, if you want your linked page
to appear on the whole page, please regard the section below this.
<a hrerf="http://www.mysite101.com" target="_self">MySite101</a>
To open your linked page in a new window, you will use target="_blank". Below is an example:
<a hrerf="http://www.mysite101.com" target="_blank">MySite101</a>
If you have mutiple frames and want to open the linked page on the whole page and not just a section of the frame, you would use
target="_top" which tells the browser to open the page on the whole page.
<a hrerf="http://www.mysite101.com" target="_top">MySite101</a>
To open your linked page in the parent frame (for framed pages), use target="_parent" to do so.
<a hrerf="http://www.mysite101.com" target="_parent">MySite101</a>
Say if you have a certain frame or iframe, etc. that you want to open your linked page in, you will need to use the name of the frame/iframe in
the target="" variable and the linked page will open there. So if the name or your iframe/frame (for the name, you will need to look under the name=""
variable of your code of the frame/iframe) is main, you will use main in the target="" variable and the code will look like:
<a hrerf="http://www.mysite101.com" target="main">MySite101</a>
MySite101
You can see that there is no _ before the main, you don't need it since it is not in the name of your iframe/frame. Also, because
we do not have an iframe/frame on our page, the example link will not work properly (it opens a new page since it cannot find the frame/iframe indicated).
|