How to Create an Email Link in HTML

pinkylalwani

Pinky Lalwani

Posted on September 21, 2022

How to Create an Email Link in HTML

Hey everyone! In this article you'll learn how to create an email link.

Before we get into creating an email link, we'll look at <a> Tag and its attribute.

Let's dive into this article 😃

<a> Tag

The <a> tag defines a hyperlink, which is used to link from one page to another.

The most important attribute of the <a>element is the href attribute, which indicates the link's destination.

<a> Attributes

  1. download
  2. The target get downloaded when a user clicks on it. download example
  3. hreflang
  4. Specifies the language of the linked document.

    hreflang example

  5. rel
  6. Specifies the relationship between the current document and the linked document.
  7. type
  8. It specifies the Internet media type (formerly known as MIME type) of the linked document. Look at IANA Media Types for a complete list of standard media types.
  9. target
  10. Specifies the media type of the linked document.

    To create an email link, you need to use the <a> tag with its href attribute, and insert a "mailto:" parameter after it.

    mailto example

    The following fields can be filledout beforehand

    1. subject
    2. code snippet

    3. cc
    4. cc code snippet

    5. bcc
    6. bcc code snippet

    7. body
    8. body text

      Note: you can add multiple values to CC and BCC by comma separating them.

      🚀 Conclusion

      Thanks for reading this out. Please feel free to leave your comments and follow for more interesting and educative posts.

      Happy coding!

💖 💪 🙅 🚩
pinkylalwani
Pinky Lalwani

Posted on September 21, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related