JavaScript Tutorial Free Downloads Download jsEditor Download jsEditor

[HTML][JavaScript][Computer Stuff][Freeing the Mind]

Ken Ward's HTML Tutorial ...

Jumping to a given place in a page!

We have now learned about creating links using the <a href="MyPage.htm"> tag. We use the same <a>-tag to jump to particular places in the current or other documents.

At the bottom of this page there is a link to the top of the page.

This works by putting the code to name the part of the document you want to jump to;

<A NAME="top"></A>

at the top of the document after the <BODY> tag. In this case I haven't put any text between the tags. If you were jumping from a menu to parts of a long document, then you would give parts of the text names so your reader could jump to them.

The hypertext link is;

<A HREF="#top">Top</A>

Note the hash (#) sign which tells the browser it has to look for the name 'top'.

We do not need to specify the name of the current document because the browser takes this as the default, but it is probably good form to include the name of the file;

<A HREF="anchors.htm#top">Top</A>

If the file name were different from the current document, the hyperlink would go to that file, to the position where the NAME tag was.

-

- LinkRotlogo.gif (3596 bytes)

-

-

Clicking this link takes you to the top of the page.


Shall we look at images now?

[back to:  hypertext links]
[home][contents]
[on to: images]

For those beginning HTML, I recommend Dummies 101®: HTML 4
by Deborah S. Ray, Eric J. Ray, Dawn Erdos. I used an earlier version of this book to learn HTML and I found it set me up very well.

Or here for amazon.co.uk.For HTML101 in the UK and Europe.

HTML for Dummies

Most Recent Revision: 18-Oct-98.
Copyright © 1998 Ken J Ward

I am always pleased to hear from you.
Send your comments to Ken Ward
and please visit: The New Life Course