(i) Linking to Documents In The Same Folder : The basic link connects one document to another file in the same folder. The given figure shows two HTML documents in the same folder.
To create a link from DocumentA.html to DocumentB.html, user will include the anchor tag <A>, the HREF= attribute and a URL that points to the file name of the DocumentB.html. In this case, the link from the originating document might looks like this,
<A HREF = “DocumentB.html”>Link Text Goes Here</A>
So, when linking to documents within the same folder user needs to include only the file name.
(ii) Linking to Document In a Different Folder : In the given figure there are files in separate folders. To create a link from Aboutus.html to consulting.html, user needs to include an URL that contains two pieces of information;
w A folder name, which specifies the folder on the server.
w A file name and extension, which specifies the exact file to display.
In this case the link might looks like this.<A HREF = “folder02/consulting.html”>Link Text</A>
Here the folder name and the file name are separated by a forward slash (/) which indicates the end of the folder name and the beginning of the file name.
(iii) Linking to Documents On The Web : When linking one document to another on the web, the document might reside on different servers. The given figure shows an originating document with a link to a document on the web.
To create a link to doc03.html in the folder01 of the www.server02.org server, we need to include the following information,
w The protocol indicator, which specifies how the server and browser communicate.
w The hostname, which tells the browser the name of the server that holds the information.
w The folder name, if necessary, which specifies the folder on the server.
w The file name, if necessary, which specifies the exact file to display.
So, the URL will look like this,
and the full link text would look like this,<A HREF = “http://www.server02.org/folder01/doc03.html”>Last try</A>