Types of Linking or Construction of Link AnchorsLink anchors are the glue that holds the web together. Link can be made to documents in the same folder, in different folder and on the web. They are described below.
(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;
- A folder name, which specifies the folder on the server.
- 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 WebWhen 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 folder01of the www.server02.org server, we need to include the following information,
- The protocol indicator, which specifies how the server and browser communicate.
- The hostname, which tells the browser the name of the server that holds the information.
- The folder name, if necessary, which specifies the folder on the server.
- 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>