Previous Section  < Day Day Up >  Next Section

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 IV, Dreamweaver provides some amazing tools for automatically updating your links so that 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.

You can use the Property inspector's Point-to-File icon to link to a named anchor on a page. Simply select some text or an image in an open page. Then drag the Point-to-File icon to an anchor on any other open document to set the link. If you can't see the shield icons that mark anchors, see above for instructions on how to make them visible.
  1. Select the text link or picture link.

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

  2. Use any of the techniques described on Section 4.2 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梬hen 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 ModifyRemove Link, or press Ctrl+Shift+L (Shift-figs/command.jpg-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 the box below) 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 ModifyPage Properties to open it. Then click the Links category and change the link colors, as described on Section 1.3.3.

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梚ncluding, yes, the ability to remove link underlines. To find out how, see the tip on Section 6.7.1.

    Previous Section  < Day Day Up >  Next Section