Linking to an anchor in your page

When you create a link to a page, the link goes to an anchor at the top of the page. You can create your own anchors and place them anywhere you want in the page. When someone clicks on a hypertext link to an anchor, the browser displays the part of the page that contains the anchor.

You can create links that jump to anchors on the same page that contains the link or that jump to anchors on other pages in your Web site.

Creating an anchor

To create an anchor in your page:

  1. Position the insertion point where you want to place the anchor in your Web page.
  2. Choose Anchor from the Insert menu, or click the Insert Anchor button on the toolbar.

    A dialog box appears with a default name for the anchor.

  3. Type a new name for the anchor.

    You'll refer to this name when you create a link to the anchor.
  4. Click OK.

    An anchor icon appears on your Web page.
  5. Save your Web page.

Creating a link to the anchor

After you've created and named the anchor in your page, you can create a link to it. To create a link to an anchor:

  1. Open the Web page that contains the anchor you want to link to.
  2. Select the text or image you want to make into a link to the anchor.
  3. Choose Link to URL from the Insert menu, or click the Link Editor button on the toolbar.

    The Link Editor opens.
  4. In the URL pop-up menu, choose the open page that contains the anchor, and then choose the anchor name from the submenu.

  5. Close the Link Editor and save the page.

    The selected text or image becomes underlined and the color of the text or the image border changes to indicate the link.

To remove the visible border from a linked image:

  1. Select the image, and choose Object Editor from the View menu (Windows) or Show Object Editor from the Window menu (Macintosh).
  2. Type 0 in the Border text box.
  3. Close the Image Object Editor.

For information about changing the default color of links, see Changing the color of links.

You can test the link in Preview Page mode or Preview in Browser mode. For more information, see Testing the links.

Tip You can create a link to the anchor by dragging the anchor from one page to another. When you drag the anchor from one page to another, the anchor remains in its original location and a text link to the anchor is inserted in the new location. To create a link in the same page as the anchor, hold down the Control key (Windows) or Option key (Macintosh), and then drag the anchor to the location where you want to insert the link. By default, the text of the link is #anchorname where anchorname is the name of the anchor.

Changing the anchor's attributes

You can change the name of an anchor at any time or add extra HTML to it. Note, however, that any links you've made to the anchor must be re-created using the new name you assign.

To rename an anchor:

  1. Double-click the anchor icon in your Web page.

    The Anchor Object Editor appears.

  2. Type a new name for the anchor in the Name text box.
  3. Close the Anchor Object Editor to apply the changes.

To add HTML to an anchor element:

  1. In the Anchor Editor, click the Both tab.
  2. Type the HTML in the Extra HTML text box.
  3. Close the Anchor Object Editor to apply the changes.


Previous topic | Contents | Next topic