Table of |
Linking it all togetherA big part of what makes the internet so amazing is the ability to link everything together, and enable you to go anywhere on the net with the click of a button. You can create a link that will take the user to anyplace that has an internet address. You can even link to anywhere on the same document. Anchor ItHTML uses the anchor tag to create links. A hypertext link has three baisic parts.
Let's start with an example. This code will create a link that will take you to the Yahoo! homepage. Click <A href="http://www.yahoo.com">here</A> to go to Yahoo!.com's home page. Notice the open and close anchor tag. The open A tag contains the address or web location. The word here is contained within the tags and will become the link text.
The example will look like this: Click here to go to Yahoo!.com's home page. Most browsers will mark the hyperlink text by underlining it and as you will remember the color of the link can be defined within the open BODY tag. Relative vs. Full URLWhen linking to a document that is not located in the same directory or file as the one you are linking from, you must use the full URL-like in the Yahoo! example. If, however, you are linking to a document that is located in the same file or directory, then you may use a relative URL. For example, if you created a new page and named it myveryownpage2.htm and stored it in the same file as the one you are linking from, then a link to the page would look like this: <A HREF="myveryownpage2.htm">Clik here to go to My Very Own Page 2</A> You can also link to other types of files such as a wav file, a zip file or an image file. For example: <A HREF="sound.wav" Linking to a Specific Place in a DocumentLinking to a specific place in a document is a two part process. First name the place in the document that you want to link to and then create a link to it. Simple enough. Here's how you name the place in the document. This code ,when placed around the heading at the top of this page will name it "top" <A NAME="top"><H1 ALIGN="center">Building Your Page</H1></A> To create a link to "top" make a regular link and use the # before it: <A HREF="#top">Click here to go to the top</A> This is what the link will look like. Try it out. Click here to go to the top Now you have the baisic HTML tools needed to create great looking web sites from scratch. The next step is to get you page up on the web. In the last section of this tutorial we will take a look at some pointers for going public with your pages (say that ten times fast).
|