240

What is the proper, universal format for creating a clickable hyperlink for users on mobile devices to call a phone number?

Area code with dashes

<a href="tel:555-555-1212">555-555-1212</a>

Area code with no dashes

<a href="tel:5555551212">555-555-1212</a>

Area code with dashes and 1

<a href="tel:1-555-555-1212">555-555-1212</a>

Area code with no dashes and 1

<a href="tel:15555551212">555-555-1212</a>

Area code with dashes, 1 and + sign

<a href="tel:+1-555-555-1212">555-555-1212</a>

Area code with no dashes, 1 and + sign

<a href="tel:+15555551212">555-555-1212</a>
Ravindra Bagale
  • 17,226
  • 9
  • 43
  • 70
MultiDev
  • 10,389
  • 24
  • 81
  • 148

6 Answers6

207

Dashes (-) have no significance other than making the number more readable, so you might as well include them.

Since we never know where our website visitors are coming from, we need to make phone numbers callable from anywhere in the world. For this reason the + sign is always necessary. The + sign is automatically converted by your mobile carrier to your international dialing prefix, also known as "exit code". This code varies by region, country, and sometimes a single country can use multiple codes, depending on the carrier. Fortunately, when it is a local call, dialing it with the international format will still work.

Using your example number, when calling from China, people would need to dial:

00-1-555-555-1212

And from Russia, they would dial

810-1-555-555-1212

The + sign solves this issue by allowing you to omit the international dialing prefix.

After the international dialing prefix comes the country code(pdf), followed by the geographic code (area code), finally the local phone number.

Therefore either of the last two of your examples would work, but my recommendation is to use this format for readability:

<a href="tel:+1-555-555-1212">+1-555-555-1212</a>

Note: For numbers that contain a trunk prefix different from the country code (e.g. if you write it locally with brackets around a 0), you need to omit it because the number must be in international format.

Mike
  • 23,542
  • 14
  • 76
  • 87
  • @Vreality2007 Actually the phone will probably add the dashes in automatically. Since it's in the source code of the page, the user will essentially never even see it. If it's a desktop user, they can hover the mouse over the link and see what will be dialed, but that's why the linking text is also the phone number, which for readability I would include the dashes. However since it costs nothing I would include them in the anchor link too. Why not, right? – Mike Dec 01 '12 at 19:47
  • @Mike as alternative to `+` one can also use `00`. – Matas Vaitkevicius Nov 04 '15 at 09:51
  • 3
    @MatasVaitkevicius Actually, no. Not everywhere uses 00 as the [international dialing prefix](https://en.wikipedia.org/wiki/List_of_international_call_prefixes), so where a different one is used, the call will probably fail. – Mike Nov 04 '15 at 20:06
60

- doesnt make matter but + sign is important when mobile user is in roaming
this is the standard format

<a href="tel:+4917640206387">+49 (0)176 - 402 063 87</a>

You can read more about it in the spec, see Make Telephone Numbers "Click-to-Call".

ndequeker
  • 7,932
  • 7
  • 61
  • 93
Ravindra Bagale
  • 17,226
  • 9
  • 43
  • 70
13

I also found this format online, and used it. Seems to work with or without dashes. I have verified it works on my Mac (tries to call the number in FaceTime), and on my iPhone:

<!-- Cross-platform compatible (Android + iPhone) -->
<a href="tel://1-555-555-5555">+1 (555) 555-5555</a>
molaro
  • 520
  • 5
  • 11
2

I used:

Tel: <a href="tel:+123 123456789">+123 123456789</a>

and the result is:

Tel: +123 123456789

Where "Tel:" stands for pure text and only the number is coded and clickable.

trifase
  • 21
  • 4
-1

Something like this will do the work

<a href="tel:+242-064-295-240" class="nav-link"><i class="fa fa-phone"></i> Call us </a>
Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
-7

You can also use callto:########### replacing the email code mail with call, at least according to W3Cschool site but I haven't had an opportunity to test it out.

Chance
  • 1