How to Insert mailto in Anchor Tag Link Using HTML

In this tutorial, learn how to insert mailto in the anchor tag link using HTML. The short answer is to use the <a> element and add mailto in the href attribute as given here.

It helps visitors of your website to send emails immediately by clicking the link with mailto system. This can be useful if you have a blog website and want your visitor’s query. You don’t need any jQuery or javascript to perform this task.

Let’s find out with the examples given below.

How to Insert mailto in Anchor tag Link Using HTML

To perform this task, you have to use the <a> tag element and add the mailto keyword in the href attribute with an email id as given below:

Output

[email protected]

The above example contains a link with an email as its content. When visitors click the above link, the mail client automatically gets opened. This system attracts visitors to send queries easily. With this method, website owner easily gets emails from their visitors with fewer efforts.

If you have a mail client on your system and mailto is added to the anchor link. It opens the mail client automatically when you click the link. You will also get the email id added to your mail client to add mail content and click send.

Open the Link with Email in the New Tab

In addition to the above-given example, you can also open the mailto link in the new window. You have to use the attribute with value as target="_blank" as given below:

Output

[email protected]

The above example contains the link with mailto added to the href attribute containing as email id. When you click the above link, it takes you to the new tab and opens the mail client to send emails.

You may also like to read.

I hope you like this tutorial on how to insert mailto in the anchor tag link using HTML.