How to create an email link in HTML?

Email link (know also as mailto link) is a special link type that opens user’s email client after the click. It can be very basic or contains additional parameters. When you pass additional parameters like body, subject, CC, or BCC, then user’s email client will open with pre-filled fields. This can be very useful, for example to encourage users to send feedback emails.

How to create a very basic email link in HTML?

To create a basic type link, use below HTML markup (change to your email address):

<a href=""></a>

How to pass pre-filled message in email link?

To pass pre-filled message in email link you can pass an additional body parameter like below:

<a href=""></a>

In this example, you can notice %20 text. This is encoded space character. To pass some special characters (like space) in the link, you have to use URL-encoded format. You can do this by using this simple tool –

How to pass other data like subject, CC or BCC?

Similarly, as above, you have to pass additional parameters.

To pass subject:

<a href=""></a>

To pass CC:

<a href=""></a>

To pass BCC:

<a href=""></a>

How to pass multiple parameters together?

To pass multiple parameters together you have to use & character as a delimiter, for example:

<a href=""></a>

How to add multiple email recipients?

To add multiple email recipients, you have to use comma character as delimiter:

<a href=","> and</a>

How to add a line break in the email message?

Similarly, as we used %20 as encoded space character, we have to use %0D%0A as encoded line break character:

<a href=""></a>

Leave a Reply

Your email address will not be published. Required fields are marked *