How do you create an email link?

Use "mailto" to create a link that attempts to open a user's email client and set the "to" address.

A email link is written using the <a> just like a regular link. Just set the href attribute to "mailto:" followed by the user's email address. For example:

<a href="">Email Link Text Here</a>

Some things you will want to consider:

  1. Email links only work if the user has an email client set up. As such, you should consider setting the text of the link to the email address itself so that users who don't have their email clients set up can find the email address.
  2. Email addresses in mailto links are easily discoverable by bots, so don't be surprised if your spam level increases after you use your email address in a mailto link.
  3. You can set a default subject a default subject and body using the subject and body parameters, like this:
    <a href=" War&body=Nice job with that!"></a>

Give it a try
Author: Nat Dunn

Nat Dunn is the founder of Webucator (, a company that has provided training for tens of thousands of students from thousands of organizations. Nat started the company in 2003 to combine his passion for technical training with his business expertise, and to help companies benefit from both. His previous experience was in sales, business and technical training, and management. Nat has an MBA from Harvard Business School and a BA in International Relations from Pomona College.

Follow Nat on Twitter at @natdunn and Webucator at @webucator.

About Webucator

Webucator provides instructor-led training to students throughout the US and Canada. We have trained over 90,000 students from over 16,000 organizations on technologies such as Microsoft ASP.NET, Microsoft Office, Azure, Windows, Java, Adobe, Python, SQL, JavaScript, Angular and much more. Check out our complete course catalog.