Dreamweaver 4 Concise Tutorial (6. Creating Hyperlinks)
Author:Eve Cole
Update Time:2009-05-30 18:35:55
6. Create hyperlinks
Hyperlink (Link), referred to as link, is a one-way relationship between pages. By clicking on links, we can jump from one page to another. We can create links in text and pictures.
1. Text link
Select the text on the page that needs to be linked, as shown below:
In the Link item of the properties panel, fill in the link address. When the viewer clicks the link, the browser will jump back to the page. For example, what is filled in here is: http://www.goeway.com
If you want the page to open in a new window, you can select "_balnk" in Target.
If you want to link to a file within the website, you can click :
In the picture above, we are linking the text to the file index2.htm. Pay special attention to the Relative To option at the bottom, which means to choose the relative path form. The default is Document, you can also choose Site Root. The difference is that Document It means that the relative path is calculated from this page, while the Site Root is calculated from the root directory (i.e. "/"), as shown below:
In addition, if you use the link made in Site Root mode, there will usually be an error when opening the page directly on the local hard disk for browsing, but there will be no problem in Dreamweaver's pre-browsing mode and after uploading to the server.
2. Picture link
The process of establishing an image link is similar to that of a text link, so I won’t introduce it in detail. But what is particularly important to mention is that some pictures will have a blue border after adding links. To remove the border, just set Border to 0.
3. Hot zone link
For the picture link introduced earlier, one picture can only correspond to one link. Can one picture correspond to multiple links? The answer is yes. After selecting a picture, you can see the Map option in the properties panel:
in: Create a rectangular hot zone, Create prototype hot zones, Create polygonal hot zones. For example, if we click now, the cursor changes to a cross, and a blue rectangular hot zone can be drawn on the picture:
The corresponding property panel at this time is:
Similarly, enter the link address in Link ("#" represents an empty link), and Alt is the text displayed when the mouse points to the hot spot, similar to the Alt in the picture. we can pass Select a different hot zone and adjust the amount of heat by adjusting the control points at the four corners of the hot zone. Through the hot zone, we can make a link on the orangutan's eyes and a link on the mouth to link to different pages.
Tips about links
1. If you want to link to an E-mail address, fill in the link: "mailto: address", for example mailto:[email protected], then when you click the link, the default E-mail program will be opened. For example, Outlook, send an E-mail to the address [email protected].
2. If the link is to a file that cannot be opened by the browser, such as exe, Zip, etc., then when the viewer clicks the link, a dialog box will pop up asking where to save the file on the hard disk. This is achieved. File download function.