Links in HTML
       
                     
  

Links in HTML

One of the powers of the Internet is the ability to connect with sites from all around the world. I will not delve into the cloudy technologies that enable us to do this, but a crucial part of any HTML document is links which connect that document to another document of yours, or the homepage of somebody in Australia.

Linking to Files


You will inevitably need more than one page when putting together an HTML project. This saves on download time because the person looking at your page can select which topics to look at as opposed to downloading everything in one huge file, and it also helps to keep your pages more organized and concise.
Creating a link to another file uses the some what arcane syntax:
<A HREF = "filename.html">Link Name</A>
A stands for Anchor and HREF stands for Hypertext REFerence.

filename.html is the full name of the file with extension, and must be enclosed in quotation marks. It is very important that you give the exact name of the file in the proper case. On most web servers, Filename.html and filename.html are considered two different files.

Link Name is what you want to appear as the link to the next document. On most browsers, this text will appear in another color and underlined. An arbitrary amount of text can appear in this field, so be sure to use </A> to close the link.

Example:

<A HREF = "index.html">Tutorial Index</A>
Tutorial Index

Linking to Other Sites


Linking to another site on the web is in essence the same. The only difference is that you must be more specific as to where you want to link. These types of links will take the form:
<A HREF = "http://www.domain.com/filename.html">Link Name</A>
http:// stands for Hyper Text Transfer Protocol, which is how things are transferred across the net. This should be put in front of all the Internet addresses that you link to.

www.domain.com is the name of the actual server that the file you want resides on. Examples of these are www.jumbo.com, www.utexas.edu, or www.fbi.gov.

filename.html is the exact file name of the document that you want to access. As when linking to your own files, spelling and case is very important. The filename can be omitted if it is un-needed. Almost all servers will automatically direct your browser to their index page if you do not include a specific file name.

Example:

<A HREF = "http://www.utexas.edu">UT's Web Central</A>
UT's Web Central