How do I Add an Email Link to HTML Code?

How do I Add an Email Link to HTML Code? thumbnail
HTML stands for HyperText Markup Language.

Contact information is essential for a successful website. A website gains credibility when a reader can contact its owner, but typing your email address on your contact page can lead to your email address being spammed. Attaching an email link to text enables readers to contact you using their default email provider. HTML is the source code of a website. There is a specific HTML code for creating an email link.

Instructions

    • 1

      Open your HTML file. Choose a location for the email link.

    • 2

      Place your cursor where the link belongs. Enter the following HTML code:

      <a href="mail to:someone@domain.com">

      Substitute your own email address in this code.

    • 3

      Enter the text that the email link is attached to. This information goes after the ">". Enter the following HTML code:

      <a href=mailto:someone@domain.com>Text</a>

    • 4

      Add a subject line. To further customize your email, set up the link to add a subject line to the email. Enter the following HTML code:

      <a href=mailto:someone@domain.com?Subject=Example">Text</a>

      This code sets a link to the word "Text" where the email is sent to someone@domain.com. The email is automatically populated with the subject line of "Example".

Tips & Warnings

  • For subject lines that contain multiple words such as "Subject Example" you need to put "%20" between the words. For example: <a href=mailto:someone@domain.com?Subject=Subject%20Example">Text</a>

Related Searches:

References

Resources

  • Photo Credit email button image by Richard Kane from Fotolia.com

Comments

You May Also Like

Related Ads

Featured