Email Links

This page demonstrates how to create HTML email links. Email links are ordinary HTML links. The difference is that, instead of opening another web page, an email link opens the user's email program with the email address already in the "To:" field.

Other fields, such as the "Subject:", can be pre-populated too.

Create a Basic Email Link

Like other HTML links, email links are created using the HTML <a> tag. The <a> tag stands for "anchor" tag. As with other HTML links, you need to fill out the href attribute. The difference with email links is that, you need to enter the email address, preceded by mailto:. Again, as with other HTML links, you also need to specify the text you'd like to be linked, and close the tag.

Automatically Add the Body Text

Adding Spaces

It is good practice to specify a space between words by using %20. You may notice that this doesn't appear to be needed, but some browsers/email clients may have problems if you don't specify it. Therefore, to reduce potential compatibility issues, the above email link could be re-written to this.

Adding Carriage Returns

Adding "cc"

You can add "cc" in a similar fashion. Simply add cc, preceded by an ampersand. Or, if you prefer to keep the email addresses together, place the cc straight after the question mark (followed by an ampersand to delimit the subject line). Here, we add the cc in between the first email address and the subject line:

Adding "bcc"

About the "?" and "&"

You may be wondering when to use the question mark and when to use the ampersand.

You only use the question mark once, and only if you are adding parameters to the email. The question mark must only follow the very first email address (i.e. the one at mailto:). Any other parameters must be preceded by an ampersand.

For example, mailto:someone@example.com?parameter1=blahblah&parameter2=moreblah&parameter3=alldone