This browser does not support basic Web standards, preventing the display of our site's intended design. May we suggest that you upgrade your browser?

HTML Coding

Basics of Web Publishing: Linking to Internet Resources

Note: The HTML pages are out-of-date and will not be updated.

An HTML document can contain links to other HTML documents and Internet resources. The link has three main components: the HTML code indicating a link (A HREF), the URL, and the text or image that indicates that it is a link. Examples of links are included in this page.

return to topUniversal Resource Locator (URL)

This is the location of the document that the link will take the user to. You need to understand the three basic parts of a URL to be able to create links. If the document is within the same directory as the master document, the site address and path is not required. The filename must include the .html extension (must be lowercase and include the four-character extension. We will begin with an example URL:

http://www.uwec.edu/Tour/tour.html

Internet Tool Type: http://
Host Name: www.uwec.edu/
Path and Filename: Tour/tour.html

Absolute URL: The complete location of a file that includes the Internet tool type and the host name (ex: "http://www.uwec.edu/Orientation/orientation.html"). Absolute URLs are used for links to documents created by others.

Relative URL: The partial location of a file that only includes the path (if there is one) and filename (ex: "Orientation/orientation.html"). Relative URLs are generally only used for files that you create.

For additional information about absolute and relative URLs, please review Naming Files and Understanding URLs.

return to topReferencing Your Link

How the links are referenced in your documents reflects on you, the Web developer. Using the phrase "click here" should be avoided because some browsers do not have the ability to click and as new users learn about the Web, they will learn very quickly how to access links. When using word links, the text for the link should closely match the title and page heading of the document that is being linked to.

The following table includes examples of how links can be identified within your document. A brief evaluation of the sample is also included.

Example Comments
Click here to see a description of rich-text format. Bad:The link is underlined and appears in color. These are two visual clues to the user that this is a link. Adding the word "click" is unnecessary to identify it as a link and may aggravate users that are using a text-based browser that does not support "clicking" on links.
This file is also available in a graphic-rich format. Good: The content of the sentence indicates what the link will take the user to.
We recommend that new users review our key to symbols. Bad: The entire sentence does not need to be identified as a link. A key word or phrase (as in the next example) is sufficient and easier for the user to read.
We recommend that new users review our key to symbols. Good: The content of the sentence indicates where the link will take the user.

return to topLink Code

Anchor: <A HREF=
URL Filename: "http://www.uwec.edu/Tour/tour.html">
Text for Link: Campus Tour
Off Code for Anchor: </A>

You can also create links to other types of Internet resources through alternative links.

return to topLink Examples

Links to other documents and sites
<A HREF="http://www.uwec.edu/Tour/tour.html">Campus Tour</A>
<A HREF="http://www.yahoo.com/">Yahoo</A>

Link to one of your files in the same directory/folder
<A HREF="element.htm">HTML Elements</A>

Link to one of your files in the parent directory/folder
<A HREF="../webpub.htm">Web Publishing Series</A>

Link to one of your files in a child directory/folder
<A HREF="/sample.htm">Sample Document</A>

Excellence. Our Measure. Our Motto. Our Goal.