You can create three kinds of links that point to targets:
A link within the same page as the target to which it points.
A link in one page that points to a target in another page in a multipage Web site you're creating in Composer.
A link in one page that points to a target in another page online that's not one of yours.
In the following pages, you will learn how to link to targets in the same page and to targets in other pages online. See Chapter 24, "Using Links to Build a Web Site," to learn how to link from one page of your own to a target in another page of your own.
In Chapter 25, "Adding Pictures (and Picture Backgrounds)," you learn not only how to add pictures to your pages, but also how to use a picture as a link.
I'm jumping ahead a little, therefore, getting into pictures here, but I should tell you now that links using any type of link sourcetext, pictures, or even multilink imagemaps (see Chapter 29, " Putting Multiple Links in One Picture")can point to targets.
Linking to a Target in the Same Page
In Composer, creating links to targets in the same file is easier if you have only one file open , so that's where you begin, in the following example.
As shown earlier in this chapter, putting a table of contents at the top of a long page is customary, with each entry in the TOC linking to a target in a section of the page.
If you create a long page of this type, you should also put a link on every section that jumps back to the TOC so that visitors can easily jump back and forth from the TOC to different sections.
Put a target right over the TOC, and insert a link at every section that points back to that target, to get visitors back to the top.
Create and select the link text, as you would when creating any kind of link, and then click the Link button.
A list of targets in the current page appears in the box labeled Select a named target. Click the name of the target you want the link to point to, and then click OK (see Figure 23.21).
Figure 23.21. Step 2: Choose a target from the list.
The list of targets is organized alphabetically , by target name, so find the target you want by name. Don't assume that the targets are listed in the same order in which they appear in the pagefrom top to bottom, unless you were careful when naming them to alphabetize them or number them consecutively, from top to bottom.
Linking to Targets in Other Pages Online
The easiest way to link to a target in someone else's page online is to find on that page a link that points to the target to which you want to link. For example, if you want to link to a particular part of a FAQ file online, find in the FAQ's table of contents a link that points to that part. Then copy that link from the Web page into your own page using copy and paste.
As always, when linking to pages that are not your own, you should email the Webmaster of the page to which you want to link and ask whether it's okay.
Some Webmasters might say that it's okay to link to the page, but not to targets within the page. This situation might happen when the page contains advertising or other information that the Webmaster wants all visitors to see; linking to targets would allow them to bypass this type of material.
Another method is to learn the target's exact URL, which is made up of the page's URL, a pound sign ( # ), and the target name. For example, the following URL:
points to a target named target1 in a page file named sample.htm on a server named www.test.com .
The easiest way to learn the URLs of targets in an online document is to browse to the document in your Web browser and find in that document the links that point to the targets. When you point to a link (don't click), the status bar at the bottom of the browser window (in Navigator or Internet Explorer) shows the full URL to which that link pointsincluding the target name.
After you know the complete URL, you can create a link to it like any other link to a Web page, by typing it in the URL box in the Link tab of the Character Properties dialog box (see Figure 23.22).
Figure 23.22. You can enter a URL that includes a target name directly in the Link tab on the Character Properties dialog box.