Learn HTML step-by-step from A to Z or improve your professional skills.  Home HTML and CSS Tutorials Everything About The Email Link
Your Ad Here

Everything About The Email Link


Everything About The Email LinkTo create an e-mail link on your page, all you need to do is use the standard link tag. The trick is in what you use as the address of the link. To force the browser to read it as an e-mail link, you use "mailto:" rather than "http://" to begin the address. After the "mailto:", you will use your e-mail address rather than a web address, like this:

<A HREF="mailto:your_email_address">E-mail Me!</A>

Yes, all you need to do is replace the your_email_address with .....your e-mail address. Here is an example, to create an email link to myself, I would place john@pageresource.com in that space, like this:

<A HREF="mailto:john@pageresource.com">Give me some mail!</A>

Here is the resulting link:

Give me some mail!

If you click on the link, your browser will bring up a window for you to send me e-mail, with my e-mail address already filled in. Send me whatever you want- maybe your joke of the day or something!

You can also create the subject of the message so the viewer doesn't have to fill in something in the subject line. You do this by adding a "?" at the end of your e-mail address and then your subject, like this:

<A HREF="mailto:john@pageresource.com?subject=Hey John">Mail Me!</A>

The example link is below, notice that when you click it, the subject field of your email message is already filled in with "Hey John".

Mail Me!

<A HREF="mailto:you@you.com?subject=Hi">Mail Me</A>

On top of adding the subject, there are a couple of extras you can also add. You can add a carbon copy recipient, a blind carbon copy recipient, or use a combination of the subject with either or both of these.

To send a carbon copy, you add the cc= command after the question mark, followed by the e-mail address of the person you want to send the carbon copy to:

<A HREF="mailto:you@you.com?cc=friend@friend.com"> Mail Me</A>

The same goes for a blind carbon copy, except you use the bcc= command instead:

<A HREF="mailto:you@you.com?bcc=friend@friend.com"> Mail Me</A>

With either of these, you can send the copies to multiple addresses by separating them with commas:

<A HREF="mailto:you@you.com?bcc=friend@friend.com, other@other.com"> Mail Me</A>

Now, if you want to combine more than one of these commands after the question mark, you add them in using an "&" sign at the end of the first command. For instance, if you want a subject and a blind carbon copy, it would look like this:

<A HREF="mailto:you@you.com?subject=Hi&bcc=friend@friend.com"> Mail Me</A>

If you want all three, use the "&" sign again:

<A HREF="mailto:you@you.com?subject=Hi&bcc=friend@friend.com&cc=other@other.com"> Mail Me</A>

With that, you can have some more fun with your e-mail links - and if you run a site with a partner you can both get an e-mail when someone uses that link.



Author's URL: John Pollock
Thank you for voting.
Rate this Materials:
Bad 
1 2 3 4 5 Excellent
print this page subscribe to newsletter subscribe to rss

HTML is Hyper Text Markup Language that is used to make hypermedia and hypertext documents for the Web. More HTML and CSS: Most Popular Materials | Fresh Materials | More HTML Tutorials at Markuptutorials.com

Add comments to "Everything About The Email Link"

Only registered users can write comment

Reader's comments