Href="tel:" And Mobile Numbers - Html - Stack Overflow

Just browsing Stack Overflow? Help us improve your experience. Sign up for research
    1. Home
    2. Questions
    3. Tags
    4. Users
    5. Companies
    6. Labs
    7. Jobs
    8. Discussions
    9. Collectives
    10. Communities for your favorite technologies. Explore all Collectives

  1. Teams

    Ask questions, find answers and collaborate at work with Stack Overflow for Teams.

    Try Teams for free Explore Teams
  2. Teams
  3. Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams

Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

Get early access and see previews of new features.

Learn more about Labs href="tel:" and mobile numbers Ask Question Asked 11 years, 5 months ago Modified 5 months ago Viewed 1.5m times 439

If I use tel: I should write the international phone code, like that.

<a href="tel:+6494461709">61709</a>

So far, so good, but I can't find information on how to write a cell phone number in an "international" way, if there is one.

Share Improve this question Follow edited Apr 8, 2017 at 9:46 Hakan Fıstık's user avatar Hakan Fıstık 19.3k16 gold badges119 silver badges144 bronze badges asked Jun 20, 2013 at 17:09 Sebastian Starke's user avatar Sebastian StarkeSebastian Starke 5,2973 gold badges25 silver badges36 bronze badges 7
  • 26 Is there a difference? – George Cummins Commented Jun 20, 2013 at 17:11
  • I dont know, if theres an "international" way to write down a cell phone number. – Sebastian Starke Commented Jun 20, 2013 at 17:12
  • 1 celphone and landline numbers should work the same – Dominic Green Commented Jun 20, 2013 at 17:13
  • 5 That means 0171 would be +49171 (for Germany)? – Sebastian Starke Commented Jun 20, 2013 at 17:14
  • 7 According to this document, you are right. Drop the '0' (which is needed only when dialing from within Germany), add the '+' prefix and country code. – George Cummins Commented Jun 20, 2013 at 17:17
| Show 2 more comments

6 Answers 6

Sorted by: Reset to default Highest score (default) Trending (recent votes count more) Date modified (newest first) Date created (oldest first) 444

When dialing a number within the country you are in, you still need to dial the national trunk number before the rest of the number. For example, in Australia one would dial:

0 - trunk prefix 2 - Area code for New South Wales 6555 - STD code for a specific telephone exchange 1234 - Telephone Exchange specific extension.

For a mobile phone this becomes

0 - trunk prefix 4 - Area code for a mobile telephone 1234 5678 - Mobile telephone number

Now, when I want to dial via the international trunk, you need to drop the trunk prefix and replace it with the international dialing prefix

+ - Short hand for the country trunk number 61 - Country code for Australia 4 - Area code for a mobile telephone 1234 5678 - Mobile telephone number

This is why you often find that the first digit of a telephone number is dropped when dialing internationally, even when using international prefixing to dial within the same country.

So as per the trunk prefix for Germany drop the 0 and add the +49 for Germany's international calling code (for example) giving:

<a href="tel:+496170961709" class="Blondie"> Call me, call me any, anytime <strong>Call me (call me) I'll arrive</strong> When you're ready we can share the wine! </a> Share Improve this answer Follow edited May 17 at 12:10 FrankieD's user avatar FrankieD 4482 silver badges11 bronze badges answered Sep 26, 2013 at 5:44 user764357user764357 8
  • 8 Alternative: <a href="tel:00496170961709" class="Blondie"> – optimiertes Commented Mar 14, 2016 at 3:21
  • 36 @optimiertes, actually no. The trunk prefix is different for different countries, so 0 works in most, but not all.user764357 Commented Mar 14, 2016 at 3:29
  • 1 It's also good to note some important info @Tropicalrambler shared on his answer as well. – Bruno Finger Commented Jan 14, 2019 at 10:09
  • 1 > "when dialing a number within the country you are in, you still need to dial the national trunk number before the rest of the number." That is not true universally i.e.: in USA - you can just dial area code + exchange + number - (777) 555 - 3333, in some older area codes you can just dial exchange + number . In Russia, for landlines it's much the same. Within the same city, you often can get away with dialing just 5-6 last numbers ( depending on how old the infrastructure is) on landlines. ( Mobile phones are a different story) – konung Commented Mar 6, 2019 at 20:43
  • 1 I came here looking for a way to do 1300, 13, and 1800 numbers. Apparently the only way to do it (that works locally and internationally) is to suffix the href with ;phone-context=+61 – Hashbrown Commented Apr 1, 2020 at 7:01
| Show 3 more comments 80

I know the OP is asking about international country codes but for North America, you could use the following:

<a href="tel:+1-847-555-5555">1-847-555-5555</a> <a href="tel:+18475555555">Click Here To Call Support 1-847-555-5555</a>

This might help you.

Share Improve this answer Follow edited Jul 6, 2020 at 9:48 Nora's user avatar Nora 3,2612 gold badges22 silver badges23 bronze badges answered Sep 26, 2013 at 5:05 vineet's user avatar vineetvineet 9776 silver badges3 bronze badges 4
  • 35 Only if your customers are only in North America. – BJury Commented Nov 24, 2014 at 10:56
  • 7 and not using international cell phones (I had a Japanese girl that had to dial the USA international code even when she was here) – BillyNair Commented Jul 28, 2015 at 22:20
  • 13 Canada and the US are +1 but Mexico is +52 (if you are planning as they are saying for North America (last time I looked at a map, Mexico was as well part of it) you will need also +52 – Nelson Commented Apr 6, 2016 at 23:07
  • 8 I wonder why this answer got upvoted. It would be perfectly fine to have an answer that covers only US numbers, but there is no reason you would not add the simple "+" to make them work from everywhere! (tel:+1847... would work for calling a US number from anywhere in the world). – Ecuador Commented May 4, 2017 at 13:42
Add a comment | 24

The BlackBerry browser and Safari for iOS (iPhone/iPod/iPad) automatically detect phone numbers and email addresses and convert them to links. If you don’t want this feature, you should use the following meta tags.

For Safari:

<meta name="format-detection" content="telephone=no">

For BlackBerry:

<meta http-equiv="x-rim-auto-match" content="none">

Source: mobilexweb.com

Share Improve this answer Follow answered Sep 3, 2014 at 13:07 Rafff's user avatar RafffRafff 1,5183 gold badges20 silver badges38 bronze badges 4
  • 28 This information is about a different matter than the question being asked. – Forage Commented Jan 13, 2015 at 14:44
  • 20 This doesn't answer the question, but it would be good as a comment. – Luca Commented Feb 25, 2016 at 15:09
  • It's relevant and comment would not be sufficient. – Martin Zvarík Commented Apr 15, 2020 at 0:13
  • Does it work for mobiles only? Will this tag convert phone numbers to link in non mobile env? – Stack Commented Jul 23, 2021 at 8:18
Add a comment | 23

As an additional note, you may also add markup language for pausing or waiting, I learned this from the iPhone iOS which allows numbers to be stored with extension numbers in the same line. A semi-colon establishes a wait, which will show as a next step upon calling the number. This helps to simplify the workflow of calling numbers with extensions in their board. You press the button shown on the bottom left of the iPhone screen when prompted, and the iPhone will dial it automatically.

<a href="tel:+50225079227;1">Call Now</a>

The pause is entered with a comma ",", allowing a short pause of time for each comma. Once the time has passed, the number after the comma will be dialed automatically

<a href="tel:+50225079227,1">Call Now, you will be automaticlaly transferred</a> Share Improve this answer Follow answered Nov 15, 2018 at 7:21 Tropicalrambler's user avatar TropicalramblerTropicalrambler 7071 gold badge10 silver badges16 bronze badges 3
  • nice answer. Usually after extension number we somtimes need to press '#'. I tried <a href="tel:+50225079227;1#">Call Now</a> but somehow chrome is removing #. Any idea if it is supported to add # ? – Goro Commented Jul 3, 2020 at 15:52
  • Maybe the solution involves escape characters of some sort? or unicode chars to express individual characters? – Tropicalrambler Commented Jul 8, 2020 at 23:04
  • 4 @Goro try %23 instead of # if it still removes it – ayunami2000 Commented Aug 28, 2020 at 15:06
Add a comment | 5

It's the same. Your international format is already correct, and is recommended for use in all cases, where possible.

Share Improve this answer Follow answered Apr 21, 2016 at 9:08 Chalky's user avatar ChalkyChalky 1,64218 silver badges20 bronze badges Add a comment | 0

This is covered by RFC 3966. The section 5.1 specifies:

The 'telephone-subscriber' part of the URI indicates the number. The phone number can be represented in either global (E.164) or local notation. All phone numbers MUST use the global form unless they cannot be represented as such.

Write it as a foreigner calls you, beginning from the numbers of the country code and prefix it with a plus sign.

Test it as some countries have special mobile number prefixing based en state/province location and other prefix numbers. Fall to local number if this global format can't be reached.

Share Improve this answer Follow answered Jun 16 at 4:33 Pitufo's user avatar PitufoPitufo 512 bronze badges Add a comment | Highly active question. Earn 10 reputation (not counting the association bonus) in order to answer this question. The reputation requirement helps protect this question from spam and non-answer activity.

Not the answer you're looking for? Browse other questions tagged or ask your own question.

  • Featured on Meta
  • We’re (finally!) going to the cloud!
  • More network sites to see advertising test [updated with phase 2]
Visit chat

Linked

1 <a href='tel:' not working 511 How to mark-up phone numbers? 26 Can a HTML telephone link accept spaces in the value? 4 How do I hyperlink a phone number? 4 Use of Parentheses in HTML with "href=tel:" -4 Find phone number in string with PHP and make it clicklable to call 1 "tel:+18475555555" link does nothing when clicked on mobile devices 1 Href tag tel: not working 1 HTML anchor tel tag formating 0 Ionic App crashes in iOS See more linked questions 1 Using href="tel:XXXXX" in links for contact numbers on web pages 2 "tel:" URLs lead to error page on non-mobile browsers 1 correct way to use "tel:" for australia numbers 1 "tel:+18475555555" link does nothing when clicked on mobile devices 3 Tel URI href=“tel:” and vanity numbers? 0 How to wrap any mobile number's into Anchor tag using javascript 1 HTML 5 : Click to call by using tel in href for alternate numbers 1 Href tag tel: not working 4 How do I hyperlink a phone number? 0 href=“tel:” with + in the middle of tel

Hot Network Questions

  • What determines your “awareness” when it comes to being criminally responsible for murder?
  • Can you see through a cannonball packing?
  • Make expressions equal to 10 using exactly six 1s
  • Why is x[] not a variable?
  • A fantasy movie with two races, "Big Ones" (=us) and smaller ones, about saving a newborn baby from a cruel queen
  • Looking for short story about detectives investigating a murder in the future
  • Can Windows firewall WF.msc do TCP port forwarding at all, like Linux iptables does?
  • Why is the term "card" used in "expansion card"?
  • How do I report to Springer a scientific fraud to a cryptographic paper published in Springer?
  • How do you write a page-centered abstract in a two column document
  • Dynamic movement of a circle and resulting ratio of intersecting areas
  • A fantasy story with an imp in a box that paints pictures
  • Translating Russian "не то, не то" into English
  • Alexander's dictum
  • Person of interest/under investigation living abroad - what can the UK police do?
  • The sum of multiple irrational numbers can be rational, even when they're not conjugates. Is this normal?
  • Why is the chi-square test giving unintuitive results?
  • How is one supposed to play these notes?
  • Gen 25:8 Difference between translations
  • When my modem places a signal on coax, is that signal still considered Ethernet?
  • A roulette wheel? An AC Milan kit? Darth Maul's face?
  • What's the contrary of formation as in the opposite of the process of formation?
  • War Magic feature with a Heavy Crossbow
  • Who is the "Sea-queen" mentioned in "Oedipus", and why is she referenced?
more hot questions Question feed Subscribe to RSS Question feed

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

lang-html

Từ khóa » Html A Tel Format