Is it possible to make a phone number clickable in HTML so that when a user clicks on the number it is called?
4
-
Are you doing the HTML markup or are you trying to use a third party website and extract the phone numbers?– techi.servicesDec 31, 2010 at 21:09
-
@sugarynugs Doing HTML markup.– leeand00Jan 2, 2011 at 5:37
-
1have you tried mbairds answer? that looks like what you want but whether it makes Android dial the number...– techi.servicesJan 2, 2011 at 13:03
-
Sorry to have been so dense. I didn't realize that your question was about generating the HTML, not about displaying it on the device. I'm going to delete my answer.– Dan BreslauJan 4, 2011 at 19:32
Add a comment
|
2 Answers
Something like this should work:
<a href="tel:+1-800-555-5555">Call 1-800-555-5555</a>
More info:
-
2Does this work on devices other than Android too? Such as BlackBerry and iPhone? (using each of their default browsers of course) And additionally what about on a browser like Opera Mini or Opera Mobile?– leeand00Jan 2, 2011 at 21:42
-
3Yes, nothing about that is Android specific. I've tested it on iOS as well as Android.– Mark BJan 2, 2011 at 23:16
You can detect a phone number in iOS with:
<i>web_view.dataDetectorTypes=UIDataDetectorTypePhoneNumber;<i>