Hypertext links
A powerful feature of HTML is its ability to link text and/or an image to another Web page or section of a Web page (known as a hypertext link). As a rule, no Web page should be so long that the reader has to constantly scroll up and down to find the information they require. If it is possible to break a Web page into more easy-to-digest sections then please do so! (a good example is this tutorial series). To create a hypertext link the <A> ... </A> tags are used. Whatever appears between these tags becomes the hypertext link (plain-text, image etc.). The destination of the link is determined by its unique URL address (Uniform Resource Locator - every Web page has one). If the Web page you are linking to is in the same directory as the current Web page, only the file name is required.
However, if you are linking to a Web page somewhere other than the directory of the current Web page, the full URL address should be used.
To create a hypertext link to your Email address, all you need to do is substitute the URL address for your Email address, like so...
Hypertext link using text
<HTML> <HEAD> <TITLE>Hypertext link example</TITLE> </HEAD> <BODY> Click <A HREF="index.htm">here</A> to goto INDEX.HTM </BODY> <ADDRESS> This Web page was written by <A HREF="MAILTO:cadenza.cyberstrider.org">Matthew Bacon</A> </ADDRESS> </HTML> Hypertext link using an image
<HTML> <HEAD> <TITLE>Hypertext link example</TITLE> </HEAD> <BODY> Click on the image below to goto INDEX.HTM <A HREF="index.htm"><IMG SRC="logo.gif"></A> </BODY> <ADDRESS> This Web page was written by <A HREF="MAILTO:cadenza.cyberstrider.org">Matthew Bacon</A> </ADDRESS> </HTML> When you link to another Web page, the browser automatically links to the top of the destination Web page. However, you may not always wish to do this! To link to a specific place within a Web page, the following HTML code needs to be included in the destination Web page. This is called an anchor. <A NAME="top"></A> You can include as many of these anchors within a Web page as you wish. However, when creating anchors please remember that each anchor needs its own unique name and that the name is case sensitive! (i.e. "TOP" is not the same as "top").The example below shows how to link to an anchor within the current Web page. The anchors name used is, "top". <A HREF="#top"> ... </A> The example below shows how to link to the anchor, "top", within the Web page "INDEX.HTM".<A HREF="index.htm#top"> ... </A> As an example, at the start of this Web pages HTML source code, an anchor called "top" can be found. The following example links to this anchor. Go on - try it and see!
Click here to goto the top of this Web page.
END OF TUTORIAL
|
Go back to Contents | Back|Next |