How to hyperlink a mail id for mailto
To hyperlink a mail ID for a mailto
link, you can use the following format:
<a href="mailto:[email protected]">Your Email Address</a>
Replace [email protected]
with the actual email address you want to link to.
Here's a breakdown of the code:
<a>
: This is the opening tag for an HTML anchor element, which defines a hyperlink.href="mailto:[email protected]"
: This attribute specifies the URL of the link. Themailto
protocol is used to open the email client with the specified email address.Your Email Address
: This is the text that will be displayed as the link.</a>
: This is the closing tag for the anchor element.
For example:
<a href="mailto:[email protected]">[email protected]</a>
When a user clicks on this link, their email client (such as Gmail, Outlook, or Apple Mail) will open with the email address [email protected]
already filled in.
Note: You can also add additional parameters to the mailto
link to specify the subject, body, and other details. For example:
<a href="mailto:[email protected]?subject=Hello&body=Hello%20again">Send Email</a>
This will open the email client with the subject "Hello" and the body "Hello again".