What are the various types of linking or anchor tags?

Types of Linking or Construction of Link Anchors : Link 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;
                  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>


Never Miss What"s New !

No SPAM, only email notification if new posts were published.

Recommended Recommends


Contact Us