HTMLmailto, tel & Other Schemes

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

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

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>
Multiple recipients
Separate multiple addresses with commas: `mailto:a@example.com,b@example.com`. Behavior can vary slightly between email clients, so test with your actual audience's common clients if this matters.
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

HTML
<a href="tel:+15551234567">Call us: (555) 123-4567</a>
Use the international format
Include the `+` and country code (e.g. `+1` for the US/Canada) in the `href` value, even if the visible text shows a locally formatted number — this way the link works correctly regardless of which country the visitor is dialing from.
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

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>
sms: body support is inconsistent
The syntax for pre-filling an SMS body differs across iOS and Android (some platforms use `?body=`, others use `;body=` or ignore it entirely). Always test on the actual devices your users are likely to use, and never rely on the body being filled.
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

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

mailto:

Default email client

subject, body, cc, bcc

tel:

Phone dialer

none — just the number

sms:

Messaging app

body (support varies)

geo:

Maps application

latitude,longitude

  • URL-encode spaces and special characters in mailto:/sms: parameters (%20 for space, & to join params).

  • Always use the international phone format (+ and country code) for tel: links.

  • These links do nothing useful on a device with no matching app installed — provide alternate contact info nearby as a fallback.