HTML Help Forum Index HTML Help
Please Search for the answer to your question before asking it! Thanks.
 

Types of Hyperlinks
Post a Reply to this Topic Ask a New Question
Click here to go to the original topic
       HTML Help Forum Index -> HTML FAQ
View previous topic :: View next topic  
Author Message


Corey Bryant



Joined: 15 May 2004
Posts: 8428
Location: Castle Pines North, CO USA

Posted: Sat Mar 04, 2006 3:26 pm     Types of Hyperlinks  

There are basically three types of hyperlinks: relative, absolute, and virtual.

RELATIVE: Code: <a href="../default.asp">Home</a>
ABSOLUTE: Code: <a href="http://www.example.com/default.asp">Home</a>
VIRTUAL: Code: <a href="/default.asp">Home</a>

There are benefits to using each one. Relative links are just that - they rely on the path of the file they are located in. For example, in the example above, Home would be in a folder off of the root web and clicking on it would take you to the home page.

Absolute links do not relate to the path of the file they are in. Instead - clicking on the example link you take you directly to the page - no matter what file it is placed in.

Virtual links are similar to relative links - they rely on the path of the file to one extent: they actually go back to the root and then over. So in the example above, the code could be placed in any folder on the web site and it will take you back to the home page.
 
 
HOSTING / DESIGN
MAKE MONEY

       HTML Help Forum Index -> HTML FAQ
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group