How to Make a Phone Number Clickable on an iPhone or Android Phone to Make a Call in HTML

Is there a way to make a phone number clickable on an iphone or android phone to make a call in HTML?

Something like this should work:

<a href="tel:+1-800-555-5555">Call 1-800-555-5555</a>

More info:

http://en.wikipedia.org/wiki/URI_scheme#tel:

https://www.rfc-editor.org/rfc/rfc3966

How to Write Clickable Telephone Number in Html which is Local Area Number without Country Code

NIST Telephone Time-of-Day Service 
<a href="tel:+1-303-499-7111">+1 (303) 499-7111</a>

you must add country code to specify where to call. and try above code.

know more about tel
https://developers.google.com/web/fundamentals/native-hardware/click-to-call/

Sample Image

How to trigger a phone call when clicking a link in a web page on mobile phone

Most modern devices support the tel: scheme. So use <a href="tel:555-555-5555">555-555-5555</a> and you should be good to go.

If you want to use it for an image, the <a> tag can handle the <img/> placed in it just like other normal situations with : <a href="tel:555-555-5555"><img src="path/to/phone/icon.jpg" alt="Call 555-555-5555" /></a>

Phone link in HTML for iOS and Android

if you want to implement this into an app, this:

in android, you can do this to detect PhoneLinks:

 webView.setWebViewClient(new WebViewClient() {
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (url.contains("tel:")) {
if (url.startsWith("tel:")) {
Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse(url));
startActivity(intent);
}
return true;
}
}
});

in IOS, you can enable this on UIwebView's properties, inside Detection, there is the "Phone Numbers" tick. it will detect any phone number or phoneLink.

this is the code on your website, it will automatically trigger the phone:

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

more info on phoneLinks (works on both systems):

https://developer.apple.com/library/safari/featuredarticles/iPhoneURLScheme_Reference/PhoneLinks/PhoneLinks.html

How to create hyperlink to call phone number on mobile devices?

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.

How to mark-up phone numbers?

The tel: scheme was used in the late 1990s and documented in early 2000 with RFC 2806 (which was obsoleted by the more-thorough RFC 3966 in 2004) and continues to be improved. Supporting tel: on the iPhone was not an arbitrary decision.

callto:, while supported by Skype, is not a standard and should be avoided unless specifically targeting Skype users.

Me? I'd just start including properly-formed tel: URIs on your pages (without sniffing the user agent) and wait for the rest of the world's phones to catch up :) .

Example:

<a href="tel:+18475555555">1-847-555-5555</a>


Related Topics



Leave a reply



Submit