1. Home
  2. Computing & Technology
  3. Personal Web Pages

Add Email Links and Link Messages
Have Fun With Your Email Links

From , former About.com Guide

Now, lets take that basic email link and add to it. First we have the basic email link that looks like this:

<a href="mailto:email@address.com">Text For Link Here</a>

Lets add a subject to the email. We would do this by first adding a question mark (?), then adding the subject code and finally adding what you want the subject line to say. Don't forget to add the space code between the words. Your code may work on some browsers, but it may not work on them all. The code to add the subject link would look like this:

?subject=Subject%20Text%20Here

This is how your email link looks now:

<a href="mailto:email@address.com?subject=subject%20Text%20Here">Text For Link Here</a>

This is how it will look to your readers:

[mail url=email@address.com?subject=Subject%20Text%20Here]Text For Link Here[/mail]

Go ahead and try it. See how the text shows up in the subject line now?

Now you can add the other things. Add a message in the body of the email or add other email addresses to have your email sent to. When adding a second attribute to your email link you will start it with an ampersand (&) and not a question mark (?).

The code to add text in the body of the email would look like this:

&body=Hello%20everyone!!%20This%20is%20your%20body%20text.

This is how your email link looks now:

<a href="mailto:email@address.com?subject=Subject%20Text%20Here&body=Hello%20everyone!!%20This%20is%20your%20body%20text.">Text For Link Here</a>

This is how it will look to your readers:

[mail url=email@address.com?subject=Subject%20Text%20Here&body=Hello%20everyone!!%20This%20is%20your%20body%20text.]Text For Link Here[/mail]

Go ahead and try it. See how the text shows up in the body of the email?

If you want to add email addresses to the cc and bcc line of the email, all you have to do is add the code for those too.

cc would look like this: &cc=email2@address.com

bcc would look like this: &bcc=email3@address.com

When you add these to your email link, the code will look like this:

<a href="mailto:email@address.com?subject=Subject%20Text%20Here&body=Hello%20everyone!!%20This%20is%20your%20body%20text.&cc=email2@address.com&bcc=email3@address.com">Text For Link Here</a>

This is how it will look to your readers:

[mail rul=email@address.com?subject=Subject%20Text%20Here&body=Hello%20everyone!!%20This%20is%20your%20body%20text.&cc=email2@address.com&bcc=email3@address.com]Text For Link Here[/mail]

Try it and see how it works!

One last thing. You can make the body text, that you added, to skip lines, if you want. Just add the code for it inside the body text.

Instead of: Hello%20everyone!!%20This%20is%20your%20body%20text.

You could do it like this: Hello%20everyone!!%0D%0AThis%20is%20your%20body%20text.

Your code will now look like this:

<a href="mailto:email@address.com?subject=Subject%20Text%20Here&body=Hello%20everyone!!%0D%0AThis%20is%20your%20body%20text.&cc=email2@address.com&bcc=email3@address.com">Text For Link Here</a>

This is how it will look to your readers:

[mail url=email@address.com?subject=Subject%20Text%20Here&body=Hello%20everyone!!%0D%0AThis%20is%20your%20body%20text.&cc=email2@address.com&bcc=email3@address.com]Text For Link Here[/mail]

Click on it to see the difference. Instead of reading:

Hello everyone!! This is your body text.

It now reads:

Hello everyone!!

This is your body text.

That's all there is to it. Have fun!!

Back To The First page > Create A Basic Email Link

Explore Personal Web Pages
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Personal Web Pages
  4. HTML Tutorials
  5. Add Email Links To Your Web Pages>

©2009 About.com, a part of The New York Times Company.

All rights reserved.