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

Chapter 4. Links > Modifying a Link

4.5. Modifying a Link

At some point, you may need to change or edit a link. Perhaps the URL you were linking to has changed, or you simply no longer need that link.

4.5.1. Changing a Link's Destination

As you'll read in Part 4, Dreamweaver provides some amazing tools for automatically updating your links so your site stays in working order, even if you move files around your site. But even Dreamweaver isn't smart enough to know when a page on someone else's Web site is moved or deleted. And you may decide you simply need to change a link so that it points to a different page on your own site. In both of these cases, you'll need to change the links on your Web pages by hand.

  1. Select the text link or picture link.

    Do so by clicking anywhere inside the text link, or clicking once on the link image.

    The existing link path appears in the Link field in the Property inspector.

    Anchors Away

    When I click on a link to an anchor, the Web browser is supposed to go to the page and display the anchor at the top of the browser window. But sometimes the anchor appears in the middle of the browser. What's that about?

    Web browsers can't scroll beyond the bottom of a Web page, so an anchor near the bottom of a page sometimes can't move to the top of the browser window. If one of your own Web pages exhibits this problem, the fix is simple: just add a bunch of empty lines—press the Enter key repeatedly—below the last item on the page. You've just added space at the bottom of the page, so the browser can scroll the page all the way to the anchor.

  2. Use any of the techniques described on page 95 for specifying the link's target.

    For example, click the Browse-for-File button in the Property inspector and locate a different Web page in your site.

    The destination of the link changes to the new URL, path, or anchor.

4.5.2. Removing a Link

Sometimes, you want to stop a link from linking—when the Web page you were linking to no longer exists, for example. You want the text or image on your Web page to stay the same, but you want to remove the disabled link. In that case, just select the link text or image, and then use one of these tactics:

  • Choose Modify→Remove Link.

  • Press Ctrl+Shift+L (Shift--L).

  • Delete the text in the Link field of the Property inspector and press the Enter or Return key.

The text or image remains on your Web page, but it no longer links to anything. If it's a text link, the color changes from your site's link color (see page 32) to the normal text color for the page.

Of course, if you're feeling particularly destructive, you can also delete the link text or image itself; doing so also gets rid of the link.

Link Colors

How can I change the color of my links?

To help Web visitors identify links, Web browsers usually display linked text in a special color (blue, for example).

If you'd prefer a different hue, you can control which color the browser uses from the Page Properties dialog box. Choose Modify→Page Properties to open it. For more information, see page 32.

While we're on the subject, I'm already using a different color for my links to make them stand out from the other text. Can I get rid of the underline that Dreamweaver automatically puts under links?

Yes, but not with HTML alone. By default, all text links show up with underlines, and no HTML code can change that. However, Cascading Style Sheets provide a lot more formatting control than plain HTML—including, yes, the ability to remove link underlines. To find out how, see Chapter 8.

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