Hyperlink

A hyperlink (often referred to as simply a link), is a reference or navigation element in a document to another section of the same document, another document, or a specified section of another document, that automatically brings the referred information to the user when the navigation element is selected by the user.

Hyperlinks are part of the foundation for the World Wide Web but are not limited to HTML or the web. Hyperlinks may be used in almost any electronic media.

On the web

To make a hyperlink in HTML, use the anchor tag: <a href="URL" title="Description of link">link text</a>.

There are three different types of hyperlinks on the web, absolute, relative, and inline links.

Absolute links

Absolute links are generally used to link to a document on a separate Website and are represented as a complete URL.

Examples
URL http://google.com
HTML The <a href="http://google.com" title="Google is a good search engine">search engine</a>.
URL https://gustavus.edu/gribly/
HTML The <a href="https://gustavus.edu/gribly/">Gribly</a> allows you to search for directory information.

Relative links

Relative links are used to link to a document that is located under the same domain name and are represented as a partial URL. There are two different types of relative links: relative from the current document and relative from the web root.

Relative from the current document

Examples
URL World_Wide_Web
HTML Learn about the <a href="World_Wide_Web" title="World Wide Web on Technology Services' wiki">World Wide Web</a>.
URL ../athletics/index.cfm
HTML The <a href="../athletics/index.php" title="Athletics at Gustavus">Athletics</a> site is one of our best.
URL webservices/frequently-asked-questions/
HTML Web Services has a list of <a href="webservices/frequently-asked-questions/">frequently asked questions</a>.


Relative from the web root

Examples
URL /gts/Hyperlink
HTML Learn about <a href="/gts/Hyperlink" title="Hyperlink on Technology Services' wiki">hyperlinks</a>.

Inline links

Inline links are used to link to information within the same document and are represented by a pound sign (#) followed by the target anchor's name.

In order for an inline link to work, you need to give it a target to point to using the anchor tag: <a name="anchor-name"></a>.

Examples
URL #chapter-three
HTML The <a href="#chapter-three" title="Jump to the third chapter">third chapter</a> of this book.

I still need help

Please e-mail web@gustavus.edu or stop by the Web Services office in Olin Hall 119.