Logo Explosvie Information for Webmasters

Adding a Hypertext Link

<html><head><title>Your title goes here</title></head>
<body bgcolor="black" background="background.gif" text="#ffffff" alink="white" link="#808000" vlink="#808000">
<h1>Your page heading here</h1>
<IMG src="picture".gif alt=TEXT YOU WANT WHILE THE PICTURE IS LOADING>
<h2>Your sub-heading<h2>
<p>Your paragraph here</p>

<a href="page2.htm">ENTER HERE</a>

<a href="page2.htm"><IMG src="picture".gif alt="TEXT YOU WANT WHILE THE PICTURE IS LOADING" /></a>

</body></html>

This done using the <a.......... tags, which stands for anchor. They will be placed around the text or image you wish to use as your link.

  • The href= attribute should contain the URL of the page which is the link target.
  • If the page is onsite, the link simply needs to be the path from the current html file to the linked document.
  • If both documents are in the same folder (directory) the file name alone will do (as on left).
  • If the link is to a document on another website the full URL should be used e.g. "http://www.somewebsite.com/some folder/document.htm"

Other Uses

<a name="chapter1"></a>

This sets a bookmark in an html document which can be linked to. Insert where you need the bookmark.

<a href="#chapter 1">Chapter 1</a>

Allows the user to jump to the location of the <a name="chapter 1"></a> tags by clicking the text Chapter 1.

<a href="tutorial.htm#chapter 1">Chapter 1</a>

Allows the user to jump from a different web page to a bookmarked point in tutorial.htm

<a href="mailto:fred@hotmail.com">Mail Me</a>

Simple email link. When clicked will open the users mail program, select new mail and insert the address into the address line.

<a href="mailto:fred@hotmail.com,jim@yahoo.co.uk">Mail Us</a>

Same as above but will add jim@yahoo.co.uk to the carbon copy feild of the mail i.e mail will go to both. Add as many people as you want separated by commas.

<a href="mailto:fred@hotmail.com?subject=Feedback">Mail Me</a>

This time the link also inserts the subject into the subject feild of the mail.

Previous Page   Next Page

 


UK Shopping Online


Counter