• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Lesson 3. Creating Links > Inserting and Linking to Named Anchors

Inserting and Linking to Named Anchors

When a document is long or has many sections, you may need to create a series of links that jump the user to specific places in the document. This technique eliminates the need for the user to scroll through the document. A named anchor marks the place in the page to which a link jumps. In this exercise, you insert a named anchor.

Open trips.htm from the Lesson_03_Links folder. Choose Modify > Page Properties to open the Page Properties dialog box. Apply the same colors for links and visited links that you used for the welcome.htm document in this lesson's first exercise.

Recall the links color's hexadecimal value was #996600 and the visited-links value was #999966. This file contains a large amount of text that requires the visitor to scroll to see the entire document.

Position the insertion point before the heading “Hawaii – Multisport” at the bottom of the document. Choose Invisibles from the Objects panel's Options menu, and click Named Anchor to insert a named anchor.

The Insert Named Anchor dialog box opens.


You can also insert a named anchor by choosing Insert > Invisible Tags > Named Anchor.

Type hawaii in the Anchor Name text box and click OK.

Don't use spaces, punctuation, or special characters (such as copyright symbols, number signs, etc.) in the name. Each anchor name must be unique. There should never be more than one anchor with the same name in the same document—if there is, the browser will not be able to jump the user to the correct anchor.

A yellow icon appears on the page to represent the anchor. This icon is an invisible element that will not appear in the browser.


If you can't see the named anchor icon, make sure that the Invisible Elements option is turned on by choosing View > Visual Aids > Invisible Elements. When you insert a named anchor, a dialog box opens to warn you if the Invisible Elements option is not turned on.

Select the text “Hawaii – Multisport” at the top of the document.

This text will act as a navigational element by jumping the user to the corresponding section of the page. You will make this text a link that references the named anchor you created in the preceding steps.

In the Link text box of the property inspector, type #hawaii.

The number sign (#) is required to tell the browser that this link is internal (will remain on the original page). Make sure that the name you type after the number sign is exactly the same as the anchor name. You should follow the naming guidelines from Lesson 1 when you name your anchors, because they are case-sensitive. If you name an anchor top and then type #Top in the Link text box, your link might not work consistently in all browsers.

The text “Hawaii – Multisport” is now linked to the Hawaii section farther down on the page. Now you will repeat the process for “Alaska Vacation.”

Add another anchor before the “Alaska Vacation” heading and name the anchor alaska.

You have created a second anchor.


If the anchor is inserted in the wrong place, you can drag it to a new position.

Select the words “Alaska Vacations” at the top of the document. Drag the Point to File icon (located next to the Link text box in the property inspector) to the Alaska anchor you just made. Release the mouse button when the pointer is directly over the anchor.

The link is made. Using the Point to File icon to create links may help prevent typing errors.

Insert anchors and links for the remaining navigational headings and the corresponding sections of the document.

You can edit the names of any anchors you create by clicking the anchor. The property inspector will change to show that a named anchor is selected. You can change the name in the property inspector's Name text box.


In long documents, it is common practice to include at the end of every section a link to a named anchor at the top of the page or to a navigational table of contents. When you use this arrangement, users don't need to scroll back up to the top of the page if they want to continue using those links to jump to other sections. Any number of links on the page can reference the same anchor. This common anchor usually is called #top.

Save the file and preview it in the browser.

The navigational terms at the top of the page will now link to their corresponding sections. You can close this file.

In the following exercise, you will continue to use named anchors and learn how to link to particular section in another document.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint