Links on web pages

Introduction

Links are a key element of any web page - a page with no links is no page at all. At the very least, you need to be able to link between pages at a site, or to pages which are based elsewhere.

Lets have a look at some then!

This is a link to a Web publisher called SilverPlatter. This next one is to a page on their site - don't try it, because I made it up!

Element attributes

<P>This is a link to a Web publisher called
<A HREF="http://www.silverplatter.com">SilverPlatter. </A>
This next one is to a <A HREF="http://www.silverplatter.com/phil/mypage.htm">page</A> on their site - don't try it, because I made it up!</P>


If you want to reference to another page on your site you can make it a relative or an absolute link.
A relative link just gives you the specific page name (or image file) with no complete path; the browser will look in the same directory for the file. An absolute link will give you the full address for the file

Element attributes

<P>A relative link just gives you the specific page name (or image file) with no complete path; the browser will look in the same directory for the <A HREF="index.htm"> file</A>
An absolute link will give you the full address for the <A HREF="http://www.philb.com/britco/index.htm">file</A></P>


Using an image as a link

You can make your links out of images as well, if you wish:
Link image Click here to go to Phil's page

Element attributes

<A HREF="http://www.philb.com/britco/index.htm"><IMG SRC="world.gif" ALT="Link image" ALIGN="BOTTOM" "WIDTH="80"> Click here to go to Phil's page</A>

Other links

Click here to go to the top of the page.
This is an ANCHOR link, which allows you to move around the page, usually to the top/bottom or to various sections if its a long document. The elements are as follows:
<P>Click <A HREF="#top">here</A> to go to the top of the page.</P> and if you check out the top of the page, the HTML tag reads as follows:
<H1><A NAME="top">Links</A> on web pages<H1>
Click to send mail to Phil Bradley
Click to send mail to <A HREF="mailto:philb@twlight.demon.co.uk">Phil Bradley</A>
This is an email link. It calls up a template email form (in NN) or a news and mail program (in MSIE), if this has been set as a browser option.


Other worked HTML examples

Forms