How To Trigger A Phone Call When Clicking A Link In A Web Page On ...
Có thể bạn quan tâm
-
- Home
- Questions
- Tags
- Users
- Companies
- Labs
- Jobs
- Discussions
- Collectives
-
Communities for your favorite technologies. Explore all Collectives
- Teams
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Try Teams for free Explore Teams - Teams
-
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 CollectivesTeams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about TeamsGet early access and see previews of new features.
Learn more about Labs How to trigger a phone call when clicking a link in a web page on mobile phone Ask Question Asked 15 years, 1 month ago Modified 2 years, 4 months ago Viewed 1.2m times 587I need to build a web page for mobile devices. There's only one thing I still haven't figured out: how can I trigger a phone call through the click of text?
Is there a special URL I could enter like the mailto: tag for emails?
Device specific solution are not preferred.
I know iPhone automatically recognizes phone numbers and creates a link for this, but it would be great if this could be done for images too... and also for most mobile devices.
Share Improve this question Follow edited Jul 6, 2016 at 20:47 Hutch Moore 1241 silver badge12 bronze badges asked Oct 22, 2009 at 16:52 Frederic MorinFrederic Morin 8,9035 gold badges29 silver badges27 bronze badges 0 Add a comment |7 Answers
Sorted by: Reset to default Highest score (default) Trending (recent votes count more) Date modified (newest first) Date created (oldest first) 1043Most 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>
Share Improve this answer Follow edited Jul 12, 2022 at 18:32 Andy 5,9842 gold badges31 silver badges53 bronze badges answered Oct 22, 2009 at 21:26 memememe 12.1k2 gold badges21 silver badges20 bronze badges 9- 13 How does this downgrade for desktop? You obviously don't want this to carry the link to desktops right? Or do I have to browser sniff and kill the enclosing tag? – 3Dom Commented Oct 12, 2013 at 14:39
- 13 @3Dom Try it. It launches or asks for your phone program. – Cees Timmerman Commented Feb 6, 2014 at 13:07
- 1 @3Dom No problem in desktop Aurora 29.0a2 (2014-02-07). You could use an image link to call (see Andrew's answer), and have the number next to it in plain text. – Cees Timmerman Commented Feb 10, 2014 at 8:50
- 2 For future reference: on OS X Yosemite and up, this will launch the Facetime app and, if the user has an iPhone, lets them actually call with their desktop/laptop. – Jeff Huijsmans Commented Jun 10, 2015 at 10:50
- 9 Hello, do not forget to put the plus sign and the country code like this: +1-555-555-5555 if you use Skype, this is a must for instant dialing. – Samuel Ramzan Commented Jul 17, 2016 at 20:31
The proper URL scheme is [number] so you would do
<a href="tel:5551234567"><img src="callme.jpg" alt="Call 5551234567" /></a>
Share Improve this answer Follow edited Jul 12, 2022 at 18:33 Andy 5,9842 gold badges31 silver badges53 bronze badges answered Oct 22, 2009 at 17:00 JessJess 42.9k6 gold badges38 silver badges52 bronze badges 0 Add a comment | 49Want to add an answer here for the sake of completeness.
<a href="tel:1234567">Call 123-4567</a>Works just fine on most devices. However, on desktops this will appear as a link which does nothing when you click on it so you should consider using CSS to make it conditionally visible only on mobile devices.
Also, you should know that Skype (which is fairly popular) uses a different syntax by default (but can be parametered to use tel:).
<a href="callto:1234567">Call 123-4567</a>However, I think in latest mobile browsers (I know for sure on Android) now the tel syntax should offer a popup of available applications that can be used to complete the calling action.
Share Improve this answer Follow edited Oct 12, 2016 at 15:00 salcoin 1071 silver badge10 bronze badges answered May 6, 2014 at 5:38 vvohra87vvohra87 5,6544 gold badges23 silver badges34 bronze badges 1- 4 Does the "tel" protocol work with Skype, or only their "callto" protocol? – Hutch Moore Commented Jul 6, 2016 at 20:15
Clickable smartphone link code:
The following link can be used to make a clickable phone link. You can copy the code below and paste it into your webpage, then edit with your phone number. This code may not work on all phones but does work for iPhone, Droid / Android, and Blackberry.
<a href="tel:1-847-555-5555">1-847-555-5555</a>Phone number links can be used with the dashes, as shown above, or without them as well as in the following example:
<a href="tel:18475555555">1-847-555-5555</a>It is also possible to use any text in the link as long as the phone number is set up with the "tel:18475555555" as in this example:
<a href="tel:18475555555">Click Here To Call Support 1-847-555-5555</a>Below is a clickable telephone hyperlink you can check out. In most non-phone browsers this link will give you a "The webpage cannot be displayed" error or nothing will happen.
NOTE: The iPhone Safari browser will automatically detect a phone number on a page and will convert the text into a call link without using any of the code on this page.
WTAI smartphone link code: The WTAI or "Wireless Telephony Application Interface" link code is shown below. This code is considered to be the correct mobile phone protocol and will work on smartphones like Droid, however, it may not work for Apple Safari on iPhone and the above code is recommended.
<a href="wtai://wp/mc;18475555555">Click Here To Call Support 1-847-555-5555</a> Share Improve this answer Follow edited Jun 7, 2020 at 0:14 Abhishek kumar 1398 bronze badges answered Nov 12, 2014 at 7:22 GIPSSTARGIPSSTAR 2,0901 gold badge25 silver badges20 bronze badges Add a comment | 7Essentially, use an <a> element with an href attr pointing to the phone number prefixed by tel:. Note that pluses can be used to specify country code, and hyphens can be included simply for human eyes.
MDN Web Docs
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#Creating_a_phone_link
The HTML <a> element (or anchor element), along with its href attribute, creates a hyperlink to other web pages, files, locations within the same page, email addresses, or any other URL.
[…]
Offering phone links is helpful for users viewing web documents and laptops connected to phones.
<a href="tel:+491570156">+49 157 0156</a>
IETF Documents
https://www.rfc-editor.org/rfc/rfc3966
Share Improve this answer Follow edited Oct 7, 2021 at 8:46 CommunityBot 11 silver badge answered Jun 22, 2019 at 0:43 52604525260452 11.6k8 gold badges54 silver badges64 bronze badges Add a comment | 2The tel URI for Telephone Numbers
The "tel" URI has the following syntax:
telephone-uri = "tel:" telephone-subscriber
[…]
Examples
tel:+1-201-555-0123: This URI points to a phone number in the United States. The hyphens are included to make the number more human readable; they separate country, area code and subscriber number.
tel:7042;phone-context=example.com: The URI describes a local phone number valid within the context "example.com".
tel:863-1234;phone-context=+1-914-555: The URI describes a local phone number that is valid within a particular phone prefix.
Just use HTML anchor tag <a> and start the attribute href with tel:. I suggest starting the phone number with the country code. pay attention to the following example:
<a href="tel:+989123456789">NO Different What it is</a>For this example, the country code is +98.
Hint: It is so suitable for cellphones, I know tel: prefix calls FaceTime on macOS but on Windows I'm not sure, but I guess it caused to launch Skype.
For more information: you can visit the list of URL schemes supported by browsers to know all href values prefixes.
Share Improve this answer Follow answered Feb 20, 2020 at 1:52 AmerllicAAmerllicA 32.2k17 gold badges142 silver badges166 bronze badges Add a comment | 0At this time (2021) to work in PC or Tablet and Android (dont tested in IOS but should works) you need add data-rel="external" to the "a" tag, example:
<a href="tel:+576015000000" data-rel="external">Call Me...</a> Share Improve this answer Follow answered Nov 17, 2021 at 22:16 Javier CañonJavier Cañon 1527 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.- The Overflow Blog
- Your docs are your infrastructure
- Featured on Meta
- More network sites to see advertising test [updated with phase 2]
- We’re (finally!) going to the cloud!
- Call for testers for an early access release of a Stack Overflow extension...
Linked
-1 show telephone number as a link in php? 2 Click to call phone number? 3 Call phonenumber on button click on mobile devices 0 How do I create href for mobile dialing screen? 0 Call Now button 0 Is possible to trigger Text Message using Html only? 1 Codeigniter base_url() added for every <a> tag 1 Making http link clickable from JSON file 0 How to set mysql output phone number as clickable call link -5 Quick Call button for responsive site on mobile phone See more linked questionsRelated
2 How do I make a link on my mobile site that causes Blackberry to make a call? 10 Automatically dial a phone number 0 How can I link to a phone call link from within an embedded web page in Android? 242 How to create hyperlink to call phone number on mobile devices? 1 Making phone call from mobile web browser 0 How to directly call in mobile by pressing link 0 How to create a link that rings a telephone number on a mobile? 3 Call phonenumber on button click on mobile devices 3 click to call phone extension smartphone 2 Click to call phone number?Hot Network Questions
- Is it ok to make a wrapper method just for readability? And is this example more readable with a wrapper method?
- Infinite series and sum of two squares
- Did Superdana manufacture a 66 AC outlet power strip/surge protector?
- Who can be proud of whom? Is there any limit?
- Frogs on lily pads want to make a party
- Can you please advise on kerning?
- Ghostwriter snap requires pandoc but doesn't find it, how to resolve?
- create a blank line in table of contents
- Spellcheck I Before E
- What is another word for when someone’s statement lacks integrity or meaning?
- Is Holy Terra Earth?
- What's the point of "Opposition" parties in one party states?
- Do longer papers have lower chances of being accepted because they take up more "space" in a journal issue (STEM)
- Do referees get to see each other's reports?
- Will judgment by scales be used on the last day?
- Does synonymy seep down to the fragments of theories?
- If scent means a pleasant smell, why do we say "lovely scent" or "sweet scent"?
- Getting into a 2008 Passat with a dead battery when the extra fob key isn't working
- How to sample a single point from a volume
- Normality assumption - qqplot interpretation
- Syllables of noun ‹cavalier›?
- Why don't routers answer ARP requests for IP addresses they can handle even if they aren't assigned that IP address themselves?
- Schrödinger's cat ++
- Did renaissance actors learn their parts by heart?
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
lang-htmlTừ khóa » Html Telephone Link Code
-
Telephone Links: How To Add “Call-able” Links & CTA's To Your ...
-
4 Steps To Add A Clickable Telephone Link In HTML - HubSpot Blog
-
How To Use An HTML Clickable Phone Number The Right Way
-
Tel - Tryit Editor V3.7
-
How To Create A Click To Call Link Using HTML And In WordPress
-
How To Add Telephone Links With HTML - W3docs
-
Create Phone Number Links In HTML | Delft Stack
-
Tel Link In Html Code Example
-
The Current State Of Telephone Links | CSS-Tricks
-
Html Make Phone Number Callable Code Example
-
Adding Phone Numbers To Web Pages With HTML5 And Microdata
-
How To Add A Click-to-Call Button On A Website With HTML - CallRail
-
How To Make A Call-able Link Using HTML ? - GeeksforGeeks
-
Make Phone Numbers Clickable (and Trackable!) On Mobile