Download ArticleDownload Article

Do you want to make it easy for your website visitors to send you an email? Creating an HTML mailto link makes it so your visitors can quickly send you a message just by clicking a hyperlink that opens a new message to the email address of your choice. We'll show you the proper tags and syntax to use to create simple HTML email hyperlinks on your website.

  1. How.com.vn English: Step 1 Type the anchor...
    Type the anchor tag <a href= in your HTML document. The "<a href=" attribute begins the link in your HTML document. The "<a href=" tag generally tells the browser that the following item is a link.[1]
    • You'll need to add all HTML code up to this point before crossing any further into the document.
  2. How.com.vn English: Step 2 Type mailto:
    after the "=" sign. This tells the web browser that the following link is to an email address, rather than a web page.[2]
    Advertisement
  3. How.com.vn English: Step 3 Type the users email next.
    A properly formatted command so-far would be <a href=mailto:<nowiki> [email protected]" .[3]
  4. How.com.vn English: Step 4 Add a pre-made subject-line (optional).
    If you wish to add a pre-made subject, type a question mark (?) after the user's email address, followed by the word "subject" (without the quotation marks), followed by an equals sign (=), followed by the subject inside a pair of quotation marks.[4]
    • If you want to add this to your command, it should look like this so far: <a href=mailto:<nowiki>[email protected]?subject="subject text"
    • Try not to use characters that aren't alphanumeric in the subject line. There are ways to work around this so your link doesn't get stumped and thinks it's part of something else".
    • While most often not used, it is possible to add information to prefill the subject line via the mailto syntax. However, it's more often used when the mail is being sent to a server inside a robot that handles incoming mail so it can be processed later (so it can be filtered).
    • You can add "body" as well as a cc or a bcc line using a similar syntax. Just make sure to use a question mark followed by the term "body","cc", or "bcc" followed by an equals sign followed by the text for that line in a pair of quotation marks.
  5. How.com.vn English: Step 5 Type > to add a closing bracket.
    So far, our HTML commands tell the web browser what email address to link to, and to add a subject/cc/bcc. The closing bracket ">" tells the web browser that there are no more commands to execute when the link is clicked.
  6. How.com.vn English: Step 6 Type link text....
    Type link text. This is the text the user clicks on to open the email link. It goes after the closing bracket. This can be a word, a phrase, or even a duplicate copy of the person's email address this is being sent to. Most often, this can be the phrase "here" or "this" or something of that sort.
  7. How.com.vn English: Step 7 Type </a> after the link text.
    This closes the HTML command. HTML anchor tags must have closure for this trick to work and not make the remainder of the page become an extension of the anchor tag.[5]
    • The entire HTML email link command should look something like this: <a href=mailto:<nowiki>[email protected]?subject="HTML link">Click here to send us an email!!!</a>
  8. How.com.vn English: Step 8 Continue the remainder of the HTML document.
    Be sure to save your work. If you have more HTML to add to your document, continue your work.
  9. Advertisement

Community Q&A

Search
Add New Question
  • Question
    How can I create a personal email system with @my website name, so a user or client can chat me directly through it and how do I create a chat platform or interface just like a messaging platform?
    How.com.vn English: Free Eagle
    Free Eagle
    Community Answer
    If you have Cpanel you can go to the "Email Accounts" and click on the "Create" button (generally on the right) and create whatever [email protected] you want. After you have created the email address, go to softaculous Apps (in Cpanel), then go to "Customer Support" and download one of the help desk apps. Direct the messages to the set email.
  • Question
    Where will I get HTML from?
    How.com.vn English: faith daniel
    faith daniel
    Community Answer
    HTML is a markup language that doesn't require any special download since the tools needed are already installed on your computer, e.g notepad, notepad++, etc. But you might consider getting more advanced and flexible software to run your codes in real-time, those includes sublime text, brackets, atom, vs code, etc.
  • Question
    How do you add an email link to a web page?
    How.com.vn English: Community Answer
    Community Answer
    Highlight the text you want to link, click the link icon, and select "Email" from the drop-down. (Optional) Edit the text you want to display as the link. Enter the email address you want contacts to send to in the Email address field. Click Insert. Click Done.
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
      Advertisement

      Video

      Tips

      • The anchor HTML tag <a> tag can be used in different ways. Better to learn about it completely to use it effectively.
      • Anchor tags must be placed inside the body (<body>...</body>) section of the HTML document. Don't put it anywhere else or it ends up causing errors or immediately opening the email agent when you load the webpage its listed on, no matter if you are previewing it or your visitor is opening this page, and could cause some aggravation for unintentional opening.
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!
      Advertisement

      Warnings

      • Putting email address on a web page can cause a spamming problem for email accounts. There are many guys over the Internet who can run programs to harvest these types of emails for spamming. So, who puts email link on a public website have to be prepared for anti-spamming as well.
      • Check the recipient name before you send the mail.
      • If users do not have email client installed on their computer then it would not be possible to send you email.
      Advertisement

      About This Article

      How.com.vn English: Travis Boylls
      Written by:
      How.com.vn Technology Writer
      This article was co-authored by How.com.vn staff writer, Travis Boylls. Travis Boylls is a Technology Writer and Editor for How.com.vn. Travis has experience writing technology-related articles, providing software customer service, and in graphic design. He specializes in Windows, macOS, Android, iOS, and Linux platforms. He studied graphic design at Pikes Peak Community College. This article has been viewed 645,374 times.
      How helpful is this?
      Co-authors: 15
      Updated: May 25, 2023
      Views: 645,374
      Categories: HTML | Email
      Article SummaryX

      1. Type "

      Did this summary help you?

      Thanks to all authors for creating a page that has been read 645,374 times.

      Is this article up to date?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement