How To Add Telephone Links With HTML - W3docs
Có thể bạn quan tâm
Solution with tel:
Telephone links are the ones that you tap to call a number on phone-capable devices. Of course, some devices are able to recognize phone numbers and provide the linking automatically, but it’s not always so.
In the example below, we use :tel within the HTML <a> tag. Note that tel: is much like a protocol, and not a feature.
Example of adding a telephone link:
<!DOCTYPE html> <html> <head> <title>Title of the document</title> </head> <body> <a href="tel:+05890000111">0-589-0000111</a> </body> </html> Try it Yourself »Result
0-589-0000111There isn’t any documentation (official) on this protocol handler for links. That’s why there can be differences in browser support and behavior. Commonly, browsers make different decisions on determining what to do with the clicked link. Also note that we included the exact telephone number inside the href attribute, but the number shown to the user is the one between the a tags. So we can show numbers in any form/style, and also we can use white-space between the digits
Styling telephone links
You can use a little CSS to style your telephone link. Let’s see an example where we add color to our link with the CSS color property.
Example of adding color to the telephone link:
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> a { color: #ff2121; text-decoration: none; } </style> </head> <body> <a href="tel:+05890000111">0-589-0000111</a> </body> </html> Try it Yourself »In our next example, we’ll add a phone character before the telephone number with the CSS ::before pseudo-element and content property.
Example of adding a phone character before the telephone link:
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> a[href^="tel:"]:before { content: "\260e"; margin-right: 10px; } </style> </head> <body> <a href="tel:+05890000111">0-589-0000111</a> </body> </html> Try it Yourself »Từ khóa » Html Mobile Tel Link
-
Telephone Links: How To Add “Call-able” Links & CTA's To Your ...
-
How To Trigger A Phone Call When Clicking A Link In A Web Page On ...
-
4 Steps To Add A Clickable Telephone Link In HTML - HubSpot Blog
-
Tel - Tryit Editor V3.7
-
How To Create A Click To Call Link Using HTML And In WordPress
-
How To Use An HTML Clickable Phone Number The Right Way
-
Create Phone Number Links In HTML | Delft Stack
-
The Current State Of Telephone Links | CSS-Tricks
-
Tel Link In Html Code Example
-
How To Make An HTML Link To Call A Phone Href=tel - WebDev-il
-
Phone Link In Html Code Example - Code Grepper
-
Make Phone Numbers Clickable (and Trackable!) On Mobile
-
Click To Call - v
-
Hyperlink Phone Numbers With Anchor Tags - Martech Zone