Hypertext or Linking Files   <a>  </a> - Anchors

The foundation of the World Wide Web is the ability to link files using Anchors. Hypertext links (Anchor) enables the user to move from one page to another on the World Wide Web with just one click.

Three components of an anchor/link are: An opening anchor tag with the destination followed by clickable text or image with the closing anchor: <a href="filename.html"> Text or Images</a>

Anchor Type Description and Format

E-mail

Mailto: opens the mailbox on the web page <a href="mailto:plants@aol.com>Contact Me"</a> ♦Subject:"mailto:plants@aol.com?subject=Order Information" Open the Mailto_demo

Relative

Links to files in the same directory <a href="filename.html">Text or Image</a>

Absolute

Links to any page on the Internet using the full URL
GOOGLE <a href="http://www.google.com">Google</a>

Internal Links

id Attributes

Links to specific section on that page. <a href="#word">Text</a>   <id="word">Text</a>
Glossary Page

Set the Base

The Relative links can be set for a specific location use the base element in the head <base href="path" />

Anchor / Hyperlink Attributes

Tooltip

Title   Mouseover link displays text about the link Hypertext Link<a href="filename.html" title="Learning about Links" >Text or Image</a>

Target

  Displays the file in a specific window. Glossary Page
Attributes: _blank, _parent, _self, new <a href="filename.html" target="_blank">Text or Image</a>

Creating Semantic Links

Rel

Describe the relationship of the current document to the linked document. The REL attribute
<a href="file.html" rel="glossary">Glossary</a>

Rev

Describes the reverse relationship of the source link. Not used by many browsers now but in the future many will.<a href="file.html" rel="glossary" rev="home">Glossary</a> -Toolbars

Web Design with XHTML Part I Doris Cuffey, Instructor