Navigation
Poll
Would you be an active poster if Ron's Guide had a message board?


Total Votes: 62
Comments: 18 — View
Past pollsPoll idea?
Rate Ron's Guide
Rate our resource at Bigwebmaster.com
Hyperlinks
Need to make a link to another page or site? How about an email link so your visitors can contact you? Find out how in this tutorial.

Hyperlinks, commonly called links, are VERY important in the internet. You see dozens of them on every website you go to...

Basic Link

Hyperlinks are created in HTML using the anchor tag - <a>.
For Example: <a href="http://yahoo.com">Yahoo!</a>
Will show in your browser as - Yahoo!
Think of is like this: <a href="website URL">Text that will be the link</a>

href?

you may be wondering, "what is href?", href stands for Hypertext Reference.


Send someone to a specific spot on the same page

Let's say you have multiple blocks of text on a page and you want to have links that will allow users to quickly jump to the block of text described by the link's text... To do this all you have to do is add somthing like this right before the block of text:
<a name="some name">...

Then you'd put this where you want the link to appear on the webpage:
<a href="#some name">some text</a>
Note: Make sure that the name of the anchor and the href of the link are
the same exept for the "#". I.E the link to: <a name="jump"> must have the href "#jump"


Send someone to a specific part of a different page

To send someone to a specific part of a different page you need to put an anchor on the page that you want the link to send the user to. Somthing like this:
<a name="middleofhomepage">, then put the link: <a href="hompage.html#middleofhomepage"> on the page that you want to have the link.


E-Mail Links

E-mail links are used quite often, and they are no more difficult to add then the links talked about above...
The basic HTML code for creating a link for sending an E-mail is:
<a href="mailto:someone@someplace.com">E-mail</a>
Your browser will show: E-mail me

Think of it like this:
<a href="mailto:someone's email address">Text that will be the link</a>

To add a subject to the email add: "?subject=" to the href, like this:
<a href="mailto:someone@someplace.com?subject=Hello">Hello</a> To add a body to the e-mail add: "&body=", like this:
<a href="mailto:someone@someplace.com?subject=Hello&body=How are you?">Hello, how are you?</a>

Here is an example of an E-mail link with a subject and body:
Hello, how are you?


Sending E-Mail to Multiple People

All you have to do is saparate the e-mail addresses by commas... Example: <a href="mailto:someone@someplace.com,mypal@hisemail.com">Send E-Mail</a> Your browser will display this as: Send E-Mail

Exeriment with these different types of hyperlinks, they are very useful.

Discuss Tutorial: Hyperlinks 4 Comments
Comment by Ron on Mar 16, 2004, 4:13 am
Please post questions or comments about this tutorial below. Smile
Comment by Will on Jul 2, 2005, 11:44 am
very helpful
Comment by wizardboy902 on Jul 12, 2005, 4:47 pm
Wink I love this. Wink
Comment by hamoon on Aug 22, 2005, 7:36 pm
thanks
you have nice site Smile

« Previous [ 1 ] Next »
Post a comment
Sorry, you must be a registered member to post comments.

If you would like to register, you can do so here.
If you already have an account, please login.