mailto:, tel:, and Other URI Schemes
Not every link has to point to a web page. Special URI schemes let
an <a href> trigger the user's email client, phone dialer, SMS
app, or other installed software — turning a plain link into a
one-tap action.
mailto: — Email Links
mailto: opens the visitor's default email client with a new message addressed to the given address.
mailto-basic.html
<a href="mailto:support@letcodes.com">Email support</a>
mailto: With Subject, Body, and cc
mailto: supports query-string-style parameters to pre-fill the subject, body, cc, and bcc fields. Spaces and special characters must be URL-encoded (%20 for space, %0A for a new line).
mailto-params.html
<a href="mailto:support@letcodes.com?subject=Bug%20report&body=Steps%20to%20reproduce%3A%0A1.%20"> Report a bug </a> <a href="mailto:sales@letcodes.com?cc=manager@letcodes.com&subject=Quote%20request"> Request a quote </a>
tel: — Phone Number Links
tel: triggers the device's phone dialer, pre-filled with the given number — most useful on mobile, where tapping a phone number should just call it.
tel.html
<a href="tel:+15551234567">Call us: (555) 123-4567</a>
sms: — Text Message Links
sms: opens the device's messaging app with the recipient pre-filled and, on many platforms, an optional pre-filled message body.
sms.html
<a href="sms:+15551234567">Text us</a> <!-- With a pre-filled message body (support varies by platform) --> <a href="sms:+15551234567?body=Hi%2C%20I%20have%20a%20question">Text us</a>
Other Custom URI Schemes
Many apps register their own URI schemes so websites can deep-link directly into them, if the app is installed.
custom-schemes.html
<a href="facetime:+15551234567">FaceTime call</a> <a href="skype:live:.cid.abc123?call">Call on Skype</a> <a href="whatsapp://send?text=Hello">Message on WhatsApp</a> <a href="geo:37.7749,-122.4194">Open in a maps app</a>
Quick Reference
Scheme | Opens | Common params |
|---|---|---|
| Default email client |
|
| Phone dialer | none — just the number |
| Messaging app |
|
| Maps application | latitude,longitude |
URL-encode spaces and special characters in mailto:/sms: parameters (
%20for space,&to join params).Always use the international phone format (
+and country code) fortel:links.These links do nothing useful on a device with no matching app installed — provide alternate contact info nearby as a fallback.