Dedicated Server Directory Dedicated Server Directory

USA

Service ChannelsDedicated Server Directory

Dedicated Server Directory

Hosting Guides

HTML Explained

Hyperlinks


The Hyperlink is what distinguishes a web page from most other types of pages. It enables the reader to 'click' on the link with the mouse cursor so the linked page can be displayed.


Hyperlinks are defined with the <A> tag, and is ended with </A>. It is known as the anchor tag. However it must always be used with an attribute, such as the HREF attribute which defines the destination page for the hyperlink, for example:


<A HREF="http://www.webhostdir.com/default.asp">Take me to the Web Host Directory</A>


produces: Take me to the Web Host Directory


As you can see, everything between <A> and </A> are highlighted and underlined by default, so the reader can distinguish hyperlinks from normal text.


The above example uses an absolute URL to take the reader to the desired page on any server. You could only specify a relative URL where the page resides in the same directory, or one relative to the page's current directory if you wish.


It is also possible to link to different places within the same file. You must do two things to achieve this. You must place a marker at the destination point, by using the <A> anchor tag with the NAME attribute to specify a name to that point within the file, for example:


<A HREF NAME="hyperlinks">


This will specify a named point within the file to be called 'hyperlinks'.


You can then link to it with the following:


<A HREF="#hyperlinks">Click here to be taken back to the start of the 'hyperlinks' section in this document</A>


Click here to be taken back to the start of the 'hyperlinks' section in this document


Notice that the text after the # signifies the named point within the file to jump to.


You can also link to named points within other files as follows:


<A HREF="anotherfile.html#hyperlinks">......</A>

Advertisements


Popular countries




Choose a letter