3.0 Hyper Links

So, you want to link to your other stuff, or other people's? Let's get started with how...

Links, or more correctly "hypertext links" or "HTLs" if you want to be really cool(!) are literally what makes the web, the web! Why? Well, imagine if a web site had no ability to link to the other pages on that web site, or that it was not possible to link to other web sites. The web as we know it wouldn't - couldn't in fact - exist! It is that interconnection of pages and sites that are the foundation of the web - and this is why I decided to devote an entire chapter to the subject!

In fact, the way to do links is extremely similar to how you link to images, but yes, you guessed it, it uses a different HTML element and some new attributes.

The element is the <a ...> element - whenever you see it in source code, it means there is a link happening! For example, have a look at the source code of this page. You will see a long list at the top (which is the menu on the left) within the code of which are <a ...> tags, and if you scroll to the bottom of the source code, you will see the three links at the bottom for the "next", "home" and "previous" pages.

There are two types of links:

  • Relative/Internal Links which are the type used to link to the other pages on your own web site
  • External Links which are the type used to link to pages on a completely different web site, perhaps in another country even!

There are also two ways of making links:

  • Text Links those that use a line of text that, when clicked, take you to the other page on your site, or other page on someone else's site
  • Hot Links those that use an image that, when clicked, take you to the other page on your site, or other page on someone else's site

NEXT: So first let's have a look at how we do text links for both relative and external links...


Back To Noframes Version Next
 

Didi Barnes is a member of:
The International Webmasters Association The HTML Writers Guild
web site design
© 1998-2008 Didi Barnes - All Rights Reserved.
No part of this HTML tutorial may be reproduced, stored in a retrieval system, or transmitted,
in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise,
without the prior permission of the copyright owner who may be contacted using the link above.

Passed HTML 4.01