Whenever a user clicks a link, the linked page usually replaces the current browser page. This is the standard link function, which has been used for all links in this lesson up until this point. The instruction to a browser regarding where the link will appear is known as the target. There are a number of different targets that you can use with your links. At times, you might want to display the new browser page in a different window. If you link to a site outside your site, for example, you might be leading users out of your site if the new site replaces yours in the browser window. If users haven’t bookmarked your URL, they might not remember how to return to your site. When an outside link opens a new browser window, the original page remains in the first window.
- Open the index.html document in the Lesson_03_Links folder and select the link to the Yoga Sangha Website. From the Property
inspector’s Target menu, choose _blank.
You created the link to the Yoga Sangha Website near the bottom of the page in the second exercise of this lesson.
Notice the six index links at the bottom of the document—these are the links you created earlier in this lesson to the index.html files inside the six folders.
Dreamweaver provides you with a number of target options to change where the linked page is to be displayed. Targets other than _blank are used with frames. You will learn about frames in Lesson 10. The possible targets are as follows:
- _blank: Loads the linked document into a new unnamed browser window.
- _parent: Loads the linked document into the parent frameset or window of the frame that contains the link.
- _self: Loads the linked document into the same frame or window as the link. This target is the same as the default, so you usually don’t have to specify it.
- _top: Loads the linked document into the full browser window, thereby removing all frames.
- Save the file and preview it in the browser.
When you click the yogasangha.com link, the linked page opens in a new browser window. You can close this file.