Skip to content

HTML Email Links

Not only can you create links to other web pages, you can also add email links for people to click on. Adding an email address is a simple process of altering the href attribute within the <a> tag.

Note: Adding email addresses in this method should be avoided. Savy programmers have devised ways to scan HTML documents and "harvest" email addresses so they can latter spam them. Also, if you collect information from your visitors, they may not like having their email address shown to the rest of the world.  A more secure method would be to create a HTML form and use a scripting language like PHP to hide any email addresses you would normally show users.

Creating a Simple Email Link

Creating an email link is no different than creating a regular web link. All you will need to do is alter the href attribute.

<a href="mailto:example@example.com">Fake Email Address Link</a>
Fake Email Address Link

Adding A  Default Message To Your Email Links

Another cool feature with creating HTML email links is you can prepopulate the subject and body fields before the user sends you an email. One useful and practical reason for doing this is so all your subject messages are the same.

<a href= "mailto: example@example.com?subject=Web Site Feedback&body=Please write your feedback here.">
Web Site Feedback Email Address</a>
Web Site Feedback Email Address