|
If you don't tell the browser where you want to open the link, it displays the destination page in the current. This is OK if you just want to put new content into the same window. You can, however, choose to open a page in a specific window or a new window. This means that the page with the link stays open and new window appears with the destination page in it. You can then toggle between the information in both windows. You need to add a target if you want the link to open in another window or frame than the link itself is placed in. To do this, you use the target attribute of the <a> tag. For example You can visit <a href="http://www.ann.com/" target="_blank"> Ann’s Web site</a> for more information This link will open the home page in a new window. You have several different targets:
If you have lots of links in your frames that point to the same target, it can be tedious to make sure that every link has the correct target attribute. To make life easier, use the <base> tag in your document head to define the default target for all links in your document. Usually, you use the <base> tag to set the base URL against which all relative URLs in your document will be resolved. If you the target attribute to the <base> tag, you also can set the default target. |
More information Linking to another page on your site Linking to other web resources Linking to specific windows |