Site hosted by Angelfire.com: Build your free website today!




<BGSOUND loop="1" src="images/Lilyquen.mid">




Go to Angelfire





Back to Main Page





E-Mail Me! Click Here!

Links

Links to Other Sites on the Web

Everywhere you go on the internet you see the word links. Links are, of course, shortcuts between two places (sites) on the web. For example: You are currently at https://www.angelfire.com/ok/blankstares/links.html. It would take quite a while to type that all into your browser everytime you wanted to come here, so hypertext was invented.

In order to make what would normally plain text into hypertext, there is a string of commands that must be entered into the html. Remember the thing about parentheses? Good. It's baaaaaaack. If I wanted to make the words "Go There" into hypertext, I would surround the words of choice with:
<a href="http://www.server.com/directory/file.html"> and </a>.

A little more complicated than changing text styles, but easy to remember after you've done it a few times. Obviously, everything in quotes should be replaced with an actual URL. Note that "http://" must be included, or many browsers will assume that the hypertext is an internal link, and all you'll get for your work is a 404 error (file not found).


Links to Other Parts of Your Own Page

Links to other parts of your own site are simple if your think of each page as a independent file, which in most cases it really is. The only exception to this is a feature of some servers called "cgi-bin". This is a directory that holds CGI (Common Gateway Interface) Scripts; Information about the scripts themselves and how they work is (for now, anyway) beyond the scope of this page; but as long as you know that the scripts are the part of a "form" that you can't see, you're doing okay. Scripts are most often used to process the information entered in the forms and generate a result based on said input. More about forms can be found here.

Anyhow, back to the topic at hand....Internal Links use the same HTML code as external links, save that all you need where the URL should be is a file name. If you have multiple directories, you should also include a directory name before the file name, seperated by slashes. See the examples below for more.

Link to another file: <a href="filename.html"> Hypertext </a>.
Link to a file in another directory: <a href="dirctoryname/filename.html"> Hypertext </a>.

If you need to link to a file that is back one or more directories, then you need to either add "../" before the directory and filename, or just type out the whole URL as though it were an external link. For example: Let's say you are at http://www.yourserver.com/dirctoryone/index.html but you want to get to http://www.yourserver.com/directorythree/menu.html
To make a direct link between these locations, you need to type <a href="../directorythree/menu.html">. The "../" tells the browser to move up one directory before looking for directorythree. This technique can be employed multiple times to move up several directories.


Jumping Around Within The Same File

Jumping around within the open page or "Active Document" is only slightly trickier than an internal link. This is because it is actually a triple statement. The first two parts are "parentheses" around the hypertext. The third part is the target, or anchor tag. This last bit doesn't actually show up on the page any more than the "parentheses", but is always active. To start, surround the words you want to make hyper text with the following:
<a href="#targetname"hot_link>Hypertext</a>.

To complete the statement, insert the target as follows:
<a name="targetname">.

Not really all that hard once you've done it a few times. Note that some wysiwyg (What You See Is What You Get) offline editors will force you to place a </a> tag after the anchor; this is not required, but it certainly wouldn't hurt to use it. It is also possible to jump straight to the target from another page. To do this insert "#targetname" after the file name: <a href="filename.html#targetname>. In this case there are no slashes used, and the pound (#) is not a number.


Automatic Forwarding to Another URL

Perhaps you have seen a page stating the "This site has moved" or "This site is no longer at this URL". Sometimes, these pages will automatically take you to the new URL of the site a few seconds later. Ever wonder how they do that? It is a matter of a single HTML tag entered into the header of a page (between <head> and </head>). The code looks like this:

<meta http-equiv="refresh" content="# URL=Enter URL of Target Page Here">

In this instance, the pound (#) after "Content=" is the number of seconds after which the link will be followed.

Note that some older browsers do not support this tag. If you are going to include such a feature on one of your pages, I would reccomend having a way to follow the link manually as well. Click here to see an example of this feature in action.

This tag can also be used to refresh a page automatically (reload the active doccument), or to automatically scroll to another part of the active doccument. To refresh the page, simply don't enter a target URL for the tag:

<meta http-equiv="refresh" content="#">

Again, replace the pound sign with a number of seconds. To scroll to another part of the page, follow the instructions in the above section when entering the target URL.


Click a link below to jump to that page
Main Page Basic HTML Change Your Page's Colors
Changing Text Styles Changing Fonts Size, Face, and Color Centering, Line Breaks, Paragraphs, and more
Marquees Setting up Links & Hypertext E-mail Links
Building and Using Lists Things HTML will ignore Make Downloads Availible on Your Site
Headers and Title Lines Adding Graphics/Graphics as Links Basic Dividers
Adding Background Music All About Tables Common HTML Errors
Customizable Forms Setting Up Your Page in FramesCascading Style Sheets
Fun with Javascripts