A link in the chain...

 

We now need to discuss an important matter. What is a link? Well, as you may imagine you cannot make all the information fit on one page and still make that page useful. Therefore, you can link between documents and files. Essentially a link (more clearly, a hyperlink) tells the computer where that file is. The internet is basically made up of a large group of computers connected together, and each computer has an address. That address is called an IP address. But the twelve number set might be something like 132.239.190.188 . Obviously that is not very descriptive of a web site. Thus, what you are more used to are what are called URL's or Uniform Resource Locators. This is comprised of the protocol manner in which the browser and document's host server communicate to exchange the document, then the internet domain name of the server that hosts the file, the hierarchy of director names in which the file is stored (pathname), and the document's name.

examples:

http://www.ucsd.edu

http:daveiscool.html

ftp://ftp.form_and_function.com/pub

another URL is :

http://www.ucsd.edu

to embed a link, you must do as follows:

<a href="http://www.ucsd.edu">http://www.ucsd.edu</a>

this will provide a link to ucsd's web site, www.ucsd.edu.

 

but if, while browsing, you just type www.ucsd.edu, most web browsers can fill in the rest. Be careful here: if you are making a link which is relative to your current page (ie, on the same server computer), you don't need to write http://www.... all you need to give is the location of the other page or file relative to the current page which the link is embedded in. This might look as follows:

<a href="pictures/one.jpeg">Check out this awesome picture</a>

This would point to a folder called pictures which is in the same directory as the current page, then to a file called one.jpeg. The <a> tag is called the anchor tag, and is used to both the source and destination of a hyperlink. Another useful aspect to this is that if you have a specific area in your page you want a person viewing it to be able to jump to, you can define a name there inside an <a> tag and then you specify a link to that name somewhere else and it makes a clickable jump point, like this:

 

 

this code will make the web surfer's browser jump to the top of the document

code:

<a href="#top">click to go to the top</a>

click to go to the top