Not every link points at a web page. Two schemes hand the destination to a different application: mail links open a mail client, and telephone links offer to dial. Both are simple to write and both have behaviour worth understanding before you rely on them.
Mail links
The mailto scheme opens whatever the user has configured as their mail application, with the address prefilled.
<a href="mailto:hello@example.com">hello@example.com</a> Note that there are no slashes after the colon, unlike a web address. This trips people up regularly and produces a link that silently does nothing.
Prefilling the message
Additional fields can be supplied as parameters. The first is introduced with a question mark and any further ones with ampersands, which must be escaped in HTML.
<a href="mailto:support@example.com?subject=Bug%20report&body=Describe%20the%20problem">Report a bug</a> Spaces and other special characters must be percent encoded, which is why the space appears as a numeric escape. Carbon copy and blind copy recipients can be added the same way. A prefilled subject is genuinely useful for routing enquiries, since it lets you filter incoming mail without asking the sender to remember a reference.
Keep prefilled bodies short. Support for long ones varies between clients and some truncate without warning.
The limitations
A mail link assumes the user has a mail application configured. Many people use webmail in a browser tab and have never set a default, in which case clicking may open nothing at all or launch an application they abandoned years ago.
This is the argument for a contact form as the primary route, with a mail link offered alongside for those who prefer it. It is also the argument for showing the address as the link text rather than hiding it behind a phrase, so that anyone whose client fails to open can still copy it.
Address harvesting is real
An address written in markup is readable by anything that fetches the page, and automated harvesting of addresses for spam lists has been running for as long as the web has existed. Publishing an address plainly means it will be collected.
The traditional obfuscations, such as writing the address with the at sign spelled out or splitting it across elements, are largely ineffective against modern harvesters and actively harmful to users, since the address can no longer be copied or read aloud correctly. Character entities offer no meaningful protection either, because entities are decoded before any scraper sees the text.
The practical options are to use a contact form, to use a role address that can be filtered aggressively, or to accept the spam and rely on filtering. Choosing one deliberately is better than a hack that inconveniences legitimate visitors while barely slowing anything automated.
Telephone links
The tel scheme lets a number be dialled with one tap, which on a phone is a meaningful convenience.
<a href="tel:+441912345678">0191 234 5678</a> The value should be in international format, beginning with a plus and the country code, with no spaces, brackets or hyphens. That guarantees it dials correctly regardless of where the caller is. The visible link text can be formatted however is most readable locally, since the two are independent.
Behaviour on desktop
On a computer with no telephony application, clicking a tel link may do nothing or may prompt to choose an application. This is not a reason to omit it, since the number remains visible as text and can be read or copied normally. Marking it up costs nothing and helps the substantial proportion of visitors who are on a phone.
Other schemes worth knowing
The same pattern extends to a few other applications. An sms scheme opens a messaging application with the number prefilled, and supports a body parameter for a prepared message. Several messaging platforms register their own schemes for opening a chat directly.
Treat all of these as enhancements rather than as the only route. A scheme the user has no application for fails silently, so the underlying information should always be visible on the page as text that can be read and copied by hand.
Stopping automatic detection
Some browsers detect anything resembling a phone number and convert it into a link automatically. This regularly misfires on order references, dates and product codes, producing links that dial nonsense and styling that fights your design.
<meta name="format-detection" content="telephone=no"> That meta tag disables the behaviour for the page, after which you can mark up the numbers that genuinely are numbers yourself. This is the better arrangement, because you control which are links rather than leaving it to a pattern match.