LinksLinks to Other Sites on the WebEverywhere 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 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 PageLinks 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: 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 | |
Jumping Around Within The Same FileJumping 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: To complete the statement, insert the
target as follows: 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 Automatic Forwarding to Another URLPerhaps 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. | |