- Linking to Another Web Page
- Linking Between Your Own Pages
- Addressing Web Pages
- Opening a Link in a New Browser Window
- Summary
- Q&A
- Workshop
Opening a Link in a New Browser Window
Now that you have a handle on how to create addresses for links, I want to share one additional little linking trick. I'm referring to opening a linked page in a new browser window, which leaves the original page still open in its original window. To accomplish this feat, you simply include an additional attribute in the <a> tag called target. You must set the target attribute to _blank for this nifty little trick to work, as the following example shows:
<a href="../zoo.htm"
target="_blank">return to the zoo.</a>
When someone clicks the linked text in this example, the zoo.htm Web page is opened in a completely new browser window. I don't encourage you to use this technique too much because most people don't enjoy new browser windows popping up everywhere. One scenario where I've found it useful is when you link to a page that isn't located on your site. This can be a helpful way to keep your site active in the background so you aren't forgotten when the link is followed!