How to Create Different Types of Website Links


 

Background

Every web page is just a file that is 1) sent from a server 2) to your computer 3) to be read by a browser (Internet Explorer, Mozilla, etc).. So, the web is just an information delivery system. The “internet” itself doesn’t really care what kind of file it transports. But, browsers – and people – do different things with different types of files. That’s where the 4 different types of links in this article come in.

Besides the fact that every web page is a file, files that aren’t web pages can also be delivered to a browser. Back to the idea that the web is an information delivery system, you can put any type of file you want on your website, a PDF, a Word document , a spreadsheet, etc. That is why a web address is called a Universal Resource Locator, instead of a Universal Webpage Locator.. For people to find those files, there have to be links to them.


Links to Other Websites

The “web” is more like a shopping mall than a stand alone business. For your website to be part of the web community, you should provide your viewers with links to other, helpful, websites. (Notice the word helpful – using link farms does not fall into this category.) Besides providing links to other websites, ask other sites to link back to your website to send traffic to your site and to help your search engine position.

To link to another website, you need the full address, including http://domainname.domain because the browser has to send a message out to find out which computer in the whole world has that website. It’s like having to use a country and area code in a phone number. You may hear of the full address being called a “fully qualified domain name” or an “absolute” link.

To Create a Link to Another Website

  1. Type the words or insert the image viewers will click.
  2. Go to the website you want to link to and copy the address from the address bar. This assures that the page is still in existence and that you don’t make a typo.
  3. Highlight the word(s) or image and paste the address into the place your program uses to create a link. Or, use <a href=”paste address here”>Word(s) or image to click</a>.
  4. Always test your links!

 

Links to Other Pages on Your Own Website

Links to other pages on your own website do not need the full domain name. Once the viewer has found the page, the browser doesn’t have to find the web host again, but can send a request back to the same server when you click another link. Links to other resources on your own site are called “relative links.”

In fact, using the full domain name on your links can cause problems. I once worked for a company where the previous developer had used the full domain names. The links worked fine, but I mentioned that that type of link would become a problem. The company owner decided that there were more pressing tasks to accomplish and not to worry about it. Then one Friday afternoon about 2:00 pm, he asked me to put the website on a CD because he was going to a conference in a hotel without internet access. I told him that none of the links would work on a CD because the browser would try to send out a message on the web to find the webhost. So, I spent that afternoon frantically trying to change all the links to relative links. There were 350 pages on the website! It would have been a lot easier if templates had been used, but that is another story altogether.

Relative links work differently from absolute links. How you structure the address depends on where you are starting from.

To Create a Link to a page in your Website

  1. Type the words or insert the image viewers will click.
  2. If the page you are linking to is in the same folder, just put the file name for the address. Example: linking to the Company History page from the About Us page in the same folder: <a href=”CompanyHistory.html”>Our Company History</a>.
  3. If the page you are linking to is in a folder inside the folder with the page with the link, use the folder name and the file name (or several folder names if its more than one folder down. Ex. Linking to the About Us page from the home page: <a href=”CompanyInformation/AboutUs.html”>About Our Company</a>.
  4. If the page you are linking to is outside the folder where the links is coming from, use ../ for every level in the address. Ex. Linking to the Home page from the About Us page: <a href=”../index.html”>Home</a>. The ../ means to go up one level.
  5. Always test your links!

 

Linking to a File that Is Not a Web Page

Linking to a file that is not a web page is just like linking to another page on your site, as far as the specific work of creating the link goes, but there are other differences.

  1. Your browser can actually only open a few types of files. For other types of files, the browser calls another program to open. For example, it will call Word to open a .doc file. For many people, their browser may not be able to tell which program should open your file, so, the browser will give them the option of downloading the file instead.
  2. If you create a link to a file that was build with a program most people don’t have, your viewers will not be able to open it at all. So, only put files on your website that can be opened with programs that are generally universal, such as Word files, spreadsheets, or PDF files. There will be some people who cannot even open these up; so you should consider including the basic information on a web page for them.
  3. The file should be inside your web site folders. Your links start inside your web files. If you create a link to something in you’re My Documents folder, your viewers will not be able to get there! It is convenient to have a Docs folder on your website to hold these other types of files.
  4. Always test your links! It is very easy to forget to upload files that aren't web pages, especially in Dreamweaver. This is another great reason to test your links after you upload the pages with the links. There is nothing more embarrasing that to go to class and try to show your students a new handout page when the link doesn't work because you forgot to upload the file!

Linking to an Email Address

Linking to an email address is always risky business because email links are spam magnets! To avoid receiving spam, many organizations have gone to online forms. However, email links are friendly and convenient for your viewers. Viewers do have some resistance to filling out a form. They don't know that it just goes to your email; so, many feel like their message will just result in some kind of form letter from your software.

Linking to an email address is very similar to linking to another type of file, because the browser has to open another program - your email client. Your viewers may run into problems with email links, if they are using a different email program than what their browser calls. For example, I worked for a company that used Goldmine for their email, but all the browsers were attached to Outlook Express. So, if I clicked on an email link, Outlook Express opened, intead of Goldmine. That is very easy to fix inside your browser, but your viewers may not know that. So, if you use words like Email Me for people to click, and your real email address isn't typed anywhere on your page; some people may not be able to email you.

To Create a Link to an Email Address

  1. Type the words or insert the image viewers will click.
  2. Highlight the word(s) or image and paste the address into the place your program uses to create a link. Or, use <a href=”mailto:youremailaddress”>Word(s) or image to click</a>. It is very important that you don't put spaces between mailto: and your address.
  3. Always test your links! Send yourself an email.

 

Other Types of Links to Learn About

Anchor Links
Image Maps

Syllabus

 

 

 

Lombardi Computer Consulting - bottom yellow swoop
Lombardi Computer Consulting - bottom blue swoop
Copyright 2009 Lombardi Computer Consulting, Missoula, Montana.