How to insert a mail link in html

To insert a mail link in HTML, you can use the <a> tag with the mailto: protocol. Here's the basic syntax:

<a href="mailto:[email protected]">Send email to [email protected]</a>

Replace [email protected] with the actual email address you want to link to.

Here are some additional options you can use:

Here's an example with some of these options:

<a href="mailto:[email protected]?subject=Hello&body=Hello%20world&[email protected]">Send email to [email protected]</a>

This will open the default email client with the subject "Hello", body "Hello world", and CC "[email protected]".

Note:

Here's an example using jQuery:

<a id="mail-link">Send email to [email protected]</a>

<script>
  $(document).ready(function() {
    var mailLink = $('#mail-link');
    mailLink.attr('href', 'mailto:[email protected]?subject=Hello&body=Hello%20world&[email protected]');
  });
</script>

This will create a mail link with the same options as the previous example, but using jQuery to set the href attribute.