Disabling Link Detection on Android and iPhone

Written by James Mansson on January 14, 2013 Categories: HTML, Mobile

Android and iPhone devices automatically attempt to detect text in HTML that corresponds to phone numbers, and turn this text into a link that calls that number. While this can be a useful feature, there will be occasions when you want to disable this feature. This can be achieved simply in HTML by adding the following in the page head section:

<meta name="format-detection" content="telephone=no" />

You can still enable linking of specific parts of the markup on the page by explicitly placing a link around that element, and using the tel protocol for the href value:

<a href="tel://01234567890"><img src="phone.png" /></a>

This is especially useful for graphical elements (e.g. an image of a phone) that wouldn’t be automatically detected.

No Comments on Disabling Link Detection on Android and iPhone

Leave a Reply

Your email address will not be published. Required fields are marked *