How to Create Mailto HTML Links | Simple Example code

The mailto HTML Linke is redirecting to an email address instead of a web page URL. On click, the Mailto link, the default email client on the user’s computer opens and suggests sending a message to the email address mentioned in the Mailto link.

Syntax

You need to use the HTML <a> tag with its href attribute, and insert a “mailto:” parameter after it:-

Example of Mailto Links in HTML

Let’s see how to create an email link in HTML (complete code):-

Output:

Create Mailto HTML Links

mailto html body

To add a body text, use the “body” parameter with other parameters:

mailto html with subject

For subject field, add the “subject” parameter to the href attribute:

Do comment if you have questions and suggestions on this topic.

Note: The All HTML Examples codes are tested on the Firefox browser and the Chrome browser.

OS: Windows 10

Code: HTML 5 Version


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.