Light ModeDark ModeReset dark mode. Falls back to OS dark mode setting.


No results for 'undefined'

Blog Posts

No results for 'undefined'
Powered by Algolia

How to Create "mailto" Email Links With HTML

Sep 17, 20181 min readHTMLViews:

Today you’ll learn how to master the invaluable skill of creating clickable email links with HTML.

Seriously? How to make an email link with HTML? Is this 1998?

No, I don’t think so. But seriously, mail links are so simple in their most basic form that it’s easy to forget how to write them (guilty!) even for experienced developers.

What is a mailto link?

This is a mailto link. Click on it, and it automatically launches your computer’s default mail client (e.g. Outlook in Windows).

And here’s how you write the mailto link above with HTML:

<a href="">email text</a>

A mailto email link uses the same code syntax as regular links, by using the anchor tag: <a>

For links you write the URL path inside the href attribute:

<a href="">

To use mailto you simply write your email address inside the href attribute:

<a href="">

You can replace the @email part with @gmail, @hotmail, or whatever email company you use.

© 2019 - TechStacker
Powered byGatsbyGithubNetlify