Index Basics Colors Fonts Images Links Tables

Links


        Links are a very important part of web pages, they allow the ability to surf / browse from page to page by using point & click. Everyone these days uses hyperlinks but if You ask someone "what is a hyperlink" they often don't have a clue, most people don't know that "hyperlink" is the real name for a link in the Hypertext Markup Language.

        URLs (Uniform Resource Locator) are the addresses to a specific server, folder, or file located on the internet. URLs are very similar to a home address.
For Example:
Joe Blow
1234 Maple lane
City, State
Joe.Blow
1234/Maple_lane
www.City_State.com
        In the same way a home address can be used for anyone (resident) who lives at the address, a URL can point a folder without using a file name, when that happens the index (or default) page is loaded by the browser. URLs are more specific than a home address, Joe.Blow is different than joe.blow, and because of this care must be taken when using URLs.

        To get started we will begin with simple text only links and then goto links with images (please read the page on images to get more info on using images) You may link to any site on the internet with a text only link, but to use the company or product logo You should first get permission from the company. This is only to protect Yourself, Most of the unique logos on the internet are copyright by the company that created them. For example the "Microsoft Internet Explorer" logo is a copyrighted logo that is allowed to be used on anyone's web page BUT! Microsoft does require You to ask for permission first! So be careful of copyrights on any text, graphics, icons, and logos You use on Your pages.

        A simple text link starts with the <A HREF="***"> (Anchor Http REFrence) tag and ends with </A> all of the words between <A HREF="***"> and </A> would be the words displayed for the hyperlink. The file name of this page is links.html so, If we wanted to link to this page and call the link "Hyperlinks" the code for the link would look like this
<A HREF="links.html">Hyperlinks</A>
and would appear like this: Hyperlinks

        So far these simple links are assuming that the linked file is in the same folder and on the same server as the current page being looked at. This is assumed because there is no folder or directory in front of the filename. To link to a page that is on a different server or to a different folder the path to that page or file must be givin. Like to link to a page on Microsoft's server the link would need to start with <A HREF="www.microsoft.com/***"> or for something located on xoom's site it would start like this <A HREF="www.xoom.com/***">.

        For another example let's use this file (links.html) and the folder it's in (http://www.purelogicco.com/computer/html_tutor/html/), from here to make a link to the "one.html" file located in a folder named "work" I could use the entire path, or simply use the relative (from the current file) path I can simply use "work/one.html". Because work is followed by a "/" (slash) it is a folder and the file in that folder is "one.html". To easily go up one folder use "../" (dot, dot, slash) or up 2 folders use "../../".

        Please note that most hyperlinks used on the internet are case sensitive and will not work unless the correct case is used! For example "links.html" is NOT ths same as "Links.html", if a file is named links.html and the Hyperlink is looking for Links.html the file will not be found and will return an "Error 404 file not found" a 404 error means that the file linked to was not located on the server (the server listed in the link)

        Hyperlinks can also use images in place of text, a good example would be a mailbox that can be clicked on to send an e-mail message. Notice the border around an image link, it's like the underline for a text hyperlink.
Mail Me
<A HREF="MAILTO:jp@purelogicco.com"> <IMG SRC="../images/mail_box.gif" WIDTH="50" HEIGHT="60" ALT="Mail Me"></A>



More on Hyperlinks




Pure Logic Co.
Copyright© 1995-1999
All Rights Reserved