Links, Anchors & Mailtos
 
What are links? Links are clickable items that connect to other documents on the web.(web pages, media files such as video, audio, pdf files, etc.) Commonly, underlined text or image buttons are used as links. Links draw the users eye to the navigable sections of the page.

What are anchors? Invisible section bookmarks within a page are called named anchors. They can be used to link to sections of a page. The URL (web address) to an anchor becomes a #name at the end of a document name,  i.e. links.html#anchors. Try out How to create anchor links to read more about them.

What can a hyperlink connect to?: 

  • Web pages on the Internet (http://www.rit.edu) 
  • other HTML documents you create (resume.html)
  • sections within a document (resume.html#education) 
  • images (me.jpg or me.gif)
  • application files for download (i.e. spreadsheet such budget.xls)
  • multimedia (sound.wav, movie.mov, realmovie.rm) 
  • Mailto links: Contact e-mail links
Naming Style: Name your text links as short phrases that describe what they connect to, not by such names as "click here".
  • Use short descriptive text. Note that your eyes are drawn to the links.

  • Good Example 1: USF Library

    Bad Example 2: Click here to go to USF Library
  • Keep linkable text short for clear destinations and easy reading 

  • Good Example 3: USF Library
    at the University of St. Francis, in Joliet, IL
    Bad Example 4: USF Library at University of St. Francis in Joliet, IL (What will this connect to?)

     
  • Do not overuse links in text. It confuses navigation and reduces importance and clarity of each link.

  • Good Example 5: USF Library
    at the University of St. Francis, in Joliet, IL
    Bad Example 6: Wallace Library
    at the University of St. Francis in Joliet, IL
     
  • Links within blocks of text should be underlined and allowed to change color when visited. Otherwise they may be hard to find and navigate within a paragraph.

  • Good Example 7: USF Library is a link.

    Bad Example
    8: USF Library is not underlined and has black as the link color. How will the user know it is linked?

Linking Files in a Website

There are 4 kinds of links discussed here: 

1. External links: Clickable underlined text that connects to web sites you did not create.
For example, from your web page, you can link to the Yahoo search directory at http://www.yahoo.com

Creating External Links: 

1a. Type the text for the link in the Document window and highlight it.

1b. In the Properties Inspector type the entire URL (web address) of the site if it is out on the Internet on a different server. (The http:// or ftp:// part must also be included.)

1c. Click in a blank section of document window to see the underlined link.

External Link Example

To re-edit the link, select it in the page and make corrections through the property inspector link box.

What if the web address is really long and difficult to type?
Copy it from the web browser location bar and paste it into Dreamweaver using short-cut keys. Be sure that there are no spaces after the end of the link. They will be translated by the web server into characters like %20 and create a broken link. 

    1. Open Netscape or Internet Explorer and go to a web page you want to link.
    2. Highlight the web address in your web browser location box.
    3. On a PC, hold the Control Key down and type the C key to copy the address.

    4. (<ctrl>-C). On a Mac, hold the down the Command (Apple) key and type the C key to copy the address (Command-C) 
    5. Back in Dreamweaver, type the name of the site in your Dreamweaver document. 
    6. Highlight the site name text. 
    7. Click the cursor in the Link box of Property Inspector. 
    8. On the PC, use the Control-V combination to paste the address. On the Mac, use the Command-V combination to paste the address.
2. Internal links: Clickable underlined text that links to content or files on your web site that you create and maintain. For example, a course web page called index.htm contains a table of contents with a link to course syllabus, syllabus.htm. Both web documents are stored in the same directory/folder.
Creating Internal Links: 

2a. Create the new document that you want to link to by selecting File>New. Set the Page Properties for it and choose Save As and name it. (i.e. calendar.html). Be sure the document or file you will link to is in the same directory as the document you are working on. It can also be in a sub-directory.

2b. Type the link text in the Document window and highlight it. In the Properties Inspector, click the yellow folder next to link.

2c. Navigate to the location of the new file and click on it. Click the Select button.

2d. The address that appears in the blank will be the file name (i.e. syllabus.html) or a folder name followed by the file name - ii.e. course1/syllabus.html. ( See example below.)

2e. Click in a blank section of document window to see the underlined text.

Internal Link example

3. E-mail Links: Clicking this type of link will launch an e-mail screen that can be filled in and sent to the web author. Note: A mailto link will only work if the browser supports e-mail and is setup to work with a local e-mail system.

Creating E-mail Links: 

3a. In the Document window, type your contact information (i.e. Contact Prof. Abby Cook at abc1234@rit.edu).

3b. Highlight the text and choose Insert > E-mail Link. Fill in the email address it should go to. 

E-mail Link Dialog BoxE-mail Link illustration

3c. Click in a blank section of document window to see the underlined mailto link.

Example of an E-mail Link and the Property Inspector view

Mailto Example Illustration

Note: In the Properties Inspector a mailto: followed by the e-mail address appears. There are no spaces between the colon and the e-mail address. (i.e. mailto:abc1234@rit.edu where abc1234 is replaced by your e-mail address.)

4. Links to Page Sections (Anchors): Clicking these kinds of links will jump the user to a specific section of the page. 

Creating anchors and linking to them: 
To make links to sections of a web page you will need to use named anchors. 

4a. Place your cursor in the section of the page you want to link to. (i.e. a subsection of the page that you have to scroll down to see)
4b. Choose Insert > Named Anchor and type a one word short descriptive name and click OK.(the name of the section) A yellow anchor icon will appear. Click on the icon, if you need to reedit the anchor.
4c. Create a link to the anchor from the top of the same page by selecting text you want to be the hyperlink. Then, in the link box of the property inspector type a # sign followed by the same name as you gave the named anchor.

Anchor links

For example, if the named anchor was called syllabus, the link would be #syllabus or, as in the dialog boxes illustrated, anchor and #anchor respectively.
To link across pages to a section on another page, the link name would be the name of the document it is in followed by the # sign and the anchor name.
i.e. To link to this anchor from another page, links.html#anchor would end the URL web address.

Checking Links: To check links, you will open a copy of your web page in a browser and check the links.

Choose: File > Preview in Browser, select a Web Browser and click through the links.
OR

Choose File > Check Links to check the links in the document you are working on.

OR

Choose Site > Check Links Sitewide if you have set-up a site. 
To Re-edit a broken link, select it in the page in Dreamweaver and make corrections through the property inspector link box. Choose File >Save and File > Preview in Browser again.


Back to Dreamweaver Tutorial