Phone numbers, everyone knows what they are. Everyone has tapped or clicked on at least one online, and noticed that it automatically pops open the phone app with the number ready to dial.
There are some interesting features of online phone links, that when used properly can make them much more useful. In this article, we'll dive into phone number links online.
General Link hrefs
Online, phone links are written as one of the options below:
<a href="tel:5555555555">Text used for link</a>
<a href="callto:5555555555">Text used for link</a>
<a href="autodetected:5555555555">Text used for link</a>
<a href="sms:5555555555">Text used for link</a>
<a href="fax:5555555555">Text used for link</a>
Note that all of these start with
<a href=". This is the link opening tag (
a says that this is a link, and
href tells the browser the link address). These all end in
">Text used for link</a>. The
"> tells the browser that this is the end of the opening
Text used for link is the text displayed as a link (the text in blue usually), and
</a> is the closing tag, telling the browser that this is the end of the
Most commonly, phone links have
href set to
tel: followed by the phone number.
tel: tells the browser that this is a telephone number meant to be called. I'll go into some more interesting features of
tel: in a following section.
People less commonly run across the opportunity to use
callto: links. These links are exactly the same as
tel: links, but they're used to call through the voice and video call software Skype.
It's rare to run across
autodetected: is never (and should never) be put in the link's
href by a website owner. These links appear when a web browser detects a phone number on a website, but there's no link. The web browser assumes that a phone number without a link is meant to be called, and automatically adds the link to help out the visitor.
sms: is a type of phone number meant to be texted. This will pop open a phone's default text messaging app with the phone number already put in.
fax: is unsupported on almost all web browsers and operating systems. It's meant to open fax software with a fax number.
modem: is also unsupported in almost all situations. It's meant to set up a modem (dial-up) connection.
Pauses and Waits
Pauses and waits are really useful, but rarely used. They allow phone extensions and automated phone system menus to be automatically navigated.
A pause is denoted by a comma (
,). Pause tells the phone to wait for 2 seconds, then dial whatever is after it.
A wait is denoted by a semicolon (
;). Wait tells the phone to not automatically type in what's after it until the user clicks or taps on a button that says it's ready.
Here are a couple examples (the text linked is the
href value in the
a tag) that go call the US Naval Observatory Master Clock (it's totally okay to call this number):
- Pause: tel:7195676742,123
Notice that after your phone dials this number, it waits 2 seconds before dialing
- Wait: tel:7195676742;123
Notice that after your phone dials this number, it prompts you to press a button to enter
As a note, there can only be one wait in a phone number, but there can be many pauses (allowing any 2 second increment to be used).
sms: links are interesting, as they are not only able to specify a receiving phone number, but a list of numbers, along with a default message.
Here are a few examples of
sms:2025551234,7705551234?body=Placeholder SMS Text
In the first example, we see the common implementation of
sms: links, where just a single number is specified.
In the next example, we see two different numbers specified with a comma in between each number.
In the final example, we can see multiple numbers with a default text message composed.
fax: links support the same options as
tel: links. The problem with these links is that they're pretty much entirely unsupported. From my understanding, these are meant to be used with computer faxing software (which does exist). However, it's really hard to find information about what software supports this link type.
Here's an example of a
modem: links are much like the unusable
fax: links, in that they can't be used in almost any situation. The specification explains that this link type should prompt the user whether they want to connect to the modem defined in the link, but most computers don't support old-school modems anymore (neither do the web browsers).
These links allow defining the modem's telephone number, what type of modem communication protocol to use, how many bits are used for data, parity type (for error checking), and specifying what brand and model modem the user is going to be calling.
Here's an example of a
Although most users will only ever user (or even see)
tel: links, I find it interesting to see that the specifications come from a time not so long ago when these other types might have been used.
I'd love to see websites start giving better
tel: links to get through their automated systems (which are always a pain).
Additional information about this topic can be found at the links below:
- tools.ietf.org/html/rfc2806: The Internet Engineering Task Force's technical specification for telephone links.
- tools.ietf.org/html/rfc5724: The Internet Engineering Task Force's technical specification for SMS links.
- developer.mozilla.org/en-US/docs/Web/HTML/Element/a#Linking_to_telephone_numbers: Mozilla's Technical Documentation about phone number links
- www.w3.org/TR/mwabp/#bp-interaction-uri-schemes: W3.org's short notes about