Should I manually hyperlink phone numbers using "tel:" on my websites?

  • In code, you have the ability to make a phone number on a website into a link by prepending the phone number in the href with a "tel:"

    So, for example, you can create a link to 800-867-5309 with the following:

    <a href="tel:+18008675309">800-867-5309</a>
    

    Some phones will automatically turn any properly formatted phone number into a link that, when clicked, will prompt you to see if you'd like to dial said number (iPhones for example).

    Does it make sense to do add these links manually so the phone numbers show up linked on desktops?

    On a desktop computer, when you click on one of these links, the computer will try to open some sort of default communication program.

    If you have not set a default communication program, this might be a little jarring as it might open a completely unfamiliar program, which I would think falls under the "unexpected results" realm.

    Is there any best practice for this sort of thing?

    Should phone number links, perhaps, be formatted differently than other links?

    Sans testing, I suspect the answer is: No. Not yet. Too few users have VOIP enabled software to make this a change that will help more users than it confuses. However, if there is a markup that **tags** a number as a phone number (but does not change the behavior) that's good... a telephony plugin can change that number into a link.

    How do I make the phone number untraceable by bots? Thanks

  • Michael

    Michael Correct answer

    9 years ago

    I suggest using microformats instead of "tel:" in your markup, and let the browser handle it.

    Power users can install a plugin or user script if their browser does not natively turn phone numbers to links to re-format the microdata or show new items in the context menu to handle that data (E.g.: "import into address book," "call directly" and so on).

    And why do you think this is better?

    Because tel: does not work in every browser on every platform. Microformats offer more flexibility in this case.

License under CC-BY-SA with attribution


Content dated before 7/24/2021 11:53 AM