Making links

School of Geography, University of Leeds


Links to other pages

These are made with the anchor tag <A></A>, for example...

<A href ="address/filename">text</A>

Where the address can be relative or absolute (you can learn about the difference here), and the 'text' is the text you want to be clicked on to take the person browsing to the file. For example, this relative address link

<A href = "throw.html">here</A>

takes you back to a page which will throw you back again, and is built into this sentence here.

Here's the same link as an absolute address...

<A href =
"http://www.geog.leeds.ac.uk/courses/other/web/writing/throw.html">here</A>

...and the link's here.

Remember to include a link back to a "navigation page" (for example, the School's frontpage at http://www.geog.leeds.ac.uk/) on your pages, so people always have the option of leaving to somewhere else.


Linking to the same page is usually bad

You can also make links to places in the current page (sometimes called "Targets") by using

<A name = "some_name"></A>

where you want to link to, and

<A href = "#some_name">text</A>

where you want to link from. For example this takes you to the top of this page if you've scrolled to the bottom. However - if your pages are so long that you need links inside them, they're too darn long anyway. We'll look at page length later.

Email links

You can make links that start up a web browser's email program and puts an address into an empty message. Just create a link to the email address with the words 'mailto:' infront of it, like this...

<A href="mailto:you@leeds.ac.uk">you@leeds.ac.uk</A>

Always use the email address as the link text, as not everyone uses an emailer that can be started by their web browser and they'll need to see the address.

If you've got this far without too many problems, congratulations! You've covered all the basics. The next set of pages tell you about advanced techniques like positioning text or making clickable pictures. Before you go on to those however, check out this refresher.



Go on to a quick refresher.

[School of Geography homepage] [Leeds University homepage]