Follow Us on FacebookFollow Us on TwitterRSS Subscribe Follow Us on YouTube

September 28, 2012

Link to an Email Address using HTML

<img src="email icon.jpg" alt="white email icon envelope">














How to create a link to an email address using html is a popular search query. In many browsers, when you click on a link like this: info@somesite.com, a new window will popup using whatever default email client you have set allowing you to compose a message and send it all in one whack.

This is the html code that is used for the email link:

<a href="mailto: bfranks@bloggerblackboard.com">Email Me</a>

Blue=Your email address

Red=Whatever text you want visible. Some webmasters use the email address here also.

The default email client set on my desktop is Outlook, so if I was to click an email link, Outlook would open with the email address already filled out in the To: field.

Keep in mind that leaving an email link on your site opens your inbox up to spam. There are tools spammers use to crawl the internet just to gather public email addresses they can then bombard with their unwanted and sometimes ridiculous messages.

This is why many bloggers and site owners use forms on their contact page instead of displaying their email address.

What do you use? Contact form or email link?

Update: You can add a subject line to the link also by doing this:

<a href="mailto: bfranks@bloggerblackboard.com?subject=Support">EmailMe</a>