Building Links in Documents
Class notes for March 21, 1996
Professor John M. McCann
A tutorial at New Mexico State University provides a good introduction to Hypertext Tags.
This note illustrates a few of the concepts and the way that I work with Netscape and an editor such as HTML Assistant.
Let's assume you want to develop a page that has several hypertext links:
To another site
We want to build a link to Duke's homepage. I use the following steps:
This is the link to Duke.
- I bring up Duke's page in Netscape.
- I click in the Location area to highlight the URL and use the Edit Copy command (or Ctrl-C) to place the URL on the clipboard.
- I go back to HTML Assistant, enter the word or phrase that I want linked (in this case, I enter Duke), and then select the word or phrase.
- With the word or phrase selected, I click on the Link button. whick opens the "Enter a URL Link" dialogue box.
- I clear the bottom window (the one denoted URL Text) and use the Edit Paste command to paste the Duke URL. The dialogue box should then look something like:
- I click OK and the word Duke is now linked to the Duke page, as illustrated below.
From a picture to another site
This time, I want to link from a picture to the Duke home page.
- I find an image that I want to use in my document and put the image in the same directory that contains the HTML document. In this example, I am using an image of Duke Chapel that I have titled chapel.gif.
- I place the cursor where I want the image to be placed in the document
- I hit the Image button in HTML Assistant, which opens the "Enter the URL for the Image" dialogue box.
- I clear the URL Text window and type in the name of the gif file. The result is a dialogue box that looks like the following:
- I clicl OK and the picture of the chapel is now included in the page via an IMG tag:
- I select all of the tag, hit the Link button, and type in the Duke URL in the Enter URL window.
- When I select OK, the image is now linked to the Duke page.
From a word or phrase to another place in the same document
Linking from one place in a document to another place in the same document requires the use of the Anchor tag.
The # symbol before the anchor name denotes an internal link.
- Find the place you want to be the anchor. In this example, we will use the heading for this section.
- Place the cursor at the beginning of the heading. In this example, I place it on the left margin beside the Header 2 tag.
- Hit the Anchor button and type a word or phrase into the dialogue box. In this example, I typed anchorlink
- When you close the dialogue box, an anchor tag will be placed at the designated place. (View the Document Source for this page to see this anchor).
- Find the place in the document that you want to link to this anchor. In this example, I go to the unordered list at the beginning of the document and select the phrase "From a word or phrase to another place in the same document"
- Hit the Link button and type # followed by the name of the anchor in the URL Text window. I typed #anchorlink
- Hit OK and the link is made.
A Mailto Link
We can use HTML Assistant to create a mailto link within our document.
Send mail to John McCann
- Type in the word or phrase that you want to be linked. In this example, I typed in "Send mail to John McCann"
- Select the phrase, or portion, that you want linked. In this example, I selected "John McCann"
- Hit the Link button,select mailto: in the URL prefixes window, and type in the email address after mailto: in the URL Text window. The box should then look like the following:,br>
- Click OK and you get a mailto link as shown below.