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

Ken Ward's HTML Tutorial ...

Jumping around the pages!


This page deals with:

Hyperlinks -
Jumping from page to page.

Hyperlink Colours
Selecting new colours for hyperlinks

Mailto Links
Using a hyperlink to send mail

Link Titles
New with the '4' Browsers, link titles are similar to the image alternate text.


Hyperlinks

Click here and you can go back to the previous page.

The code for the above is as follows;

<a href="horizontal_rules.htm">Click</a>

So when you want to do a jump, you just put in the code

<a href="MyPage.htm">Your text for the link</a>

Replacing MyPage.htm with the name of the htm or html file you want to jump to. (if you want to learn about URLs, then click here.)

Don't forget the end anchor tag, otherwise everything that follows will be a link to that page!

Most attributes in a tag must be lower case, to meet future standards. The old way of writing some of them upper case, or anyway, will not meet future standards.


Hyperlink Colours

You must have noticed that hyperlinks or anchors are coloured in a browser. This lets the user know that the text is a link, although the mouse cursor also changes to show the link cursor, probably a hand. The anchor colours are set as a default in the browser, but they can be set for the page in the body tag.

<body body vlink="green" alink="blue" link="red" >

With the above settings, a link that has never been visited is coloured 'red.' One that has been visited is coloured 'green.' And one that is being clicked is coloured 'blue.' If this is not specified, which it normally isn't, then the browser defaults are used.


Mailto Links

Click the above link. Your email software will activate and you can look at the subject line. It says 'Sent from HTML Tutorial.' Here's the code;

<a href= "mailto:me@myCom.net?SUBJECT='Sent from HTML Tutorial.'">Send me your opinions</a>

The part in bold is not essential. It puts the subject line in the email! Can be very useful when you want to know which page inspired the email.

We have now got our pages more interactive. Let's see how we can jump to a particular place in a document!


Link Titles

If you place your cursor over the links below, you will see a little box pop up in a second or two and tell you more about the link. Here is an example code:

Back to: <a href="horizontal_rules.htm" title="Learn about horizontal rules">horizontal rules</a>

You get the effect by adding title="My message" to the link. This enables hyperlinks to have a similar description message to that which has long been available in images (through the ALT text). Use it when some explanation would help. If you are just repeating words in the text, then it is superfluous. It only works in the more modern browsers, but older browsers just ignore it, so it is safe to use.


[back to:  horizontal rules]
[home][contents]
[on to: jump to a particular place in a document]


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

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