:: crazy8 #web_resources ::


Hypertext
Tutorial by
Mr. Baldy

Hypertext, otherwise known as anchors, links, and some other terms, are the way pages are linked to each other. That's how you got from the previous page of this HTML guide, to this one, and so on, and so on. They are the reason why the WWW is possible.

There is one main way links are presented. First off. We learn the basic tag.

<a></a>

That won't do anything by itself; we need to embed things into it to make it do something. For basic links, we embed the HREF attribute into it, and for the value, we put the direction or address we want the location to link to, like this:

<a href="http://www.yahoo.com"></a>

NOTE: The general color for links is defined in the BODY tag. That would show up like this:



Notice there is nothing there. That is because you need to define some text the user can click on to access the hyperlink, like this:

<a href="http://www.yahoo.com">Yahoo</a>

And you would be able to use it:

Yahoo

You can also link pictures, by putting them in the area where text normally is, like this:

<a href="http://www.yahoo.com"><img src="pic.*"></a>

Maybe you would want to make a link, but stay in the same page. For example, if you wanted to make a link to the top of the page so the user wouldn't have to scroll, you could do that, but it is a little more complicated. First, you need to place a location in your document to where you want to link. ( EX: Right below the BODY tag for the top of the document ) You will have to name this area, like this:

<a name="top">

You don't need the ending tag. Then, in the link you can tell that location by doing this:

<a href="#top">Top</a>

Notice the (#) sign. This states that the link wll jump to a certain part of the document. Also, if you know another page, and you want to link to another part of that, you can do the same thing by naming the part, and then doing this:

<a href="http://www.yahoo.com/index.htm#bottom">Yahoo Bottom</a>

You must put the whole address name. ( http://www.yahoo.com#bottom ) would NOT work.

Links are also used to do e-mail links. It's another simple addition, but this time in the HREF value area, like this:

<a href="mailto:mr_baldy@geocities.com">E-mail me</a>

Notice MAILTO: was added. Then, just put the e-mail address.

If you want to make a default subject in the e-mail message, you would just add this to the end:

<a href="mailto:mr_baldy@geocities.com?subject=Whatever">E-mail me</a>

That would e-mail me with a certain subject in the letter.

If you are using a page with frames, like many people do, you might want to have the link open up in a certain frame other than the one the link is in. For this, you must name the frame. This is best explained in the frames tutorial. In the FRAME tag, where you put the source ( SRC ) for it, you can also put NAME=X, where X is the name for the frame. Then, embed this in the A tag:

<a href="links.htm" target="frame2">Links</a>

Where "frame2" is, you put the name you gave the frame you want the document to open in.

That should cover most everything you should know concerning hypertext. Normal links and e-mail links are most oftenly used, and they are a must to know.

<< back  |  top  |  next >>










. . . . . . . . . . . . . . . . . . . . . . .
All html, graphics, and javascript is © 1999 crazy8 #web_resources
All quake, quake 2, and quake arena content is © id software
All unreal content is © epic megagames, and half-life © valve software
Page designed by mr. baldy ( webmaster )
Menu

Home

Tutorials
Free gfx
Design Tips
Templates
Reviews

Consultation

Contact