How (or should I) markup phone numbers in a website?

1.1k views Asked by At

Im mobile optimising a website with media queries. Without any extra markup the phone numbers seems to be recognised and become 'clickable' on iphones and android, but my windows phone emulator only recognises the 2nd 1/2 of one the numbers.

This method doesnt work on opera mobile:

<a href="tel:1234">1234</a>

http://developer.apple.com/library/safari/#codinghowtos/Mobile/UserExperience/_index.html

This method makes the link clickable in desktop browsers, even if the browser doesn't know how to handle the number:

<a href=”#” tel=”1234”>1234</a>

http://www.wpromote.com/blog/google/optimizing-your-web-site-for-mobile-3-easy-tips/

So whats the best solution or trade off for markup around phone numbers? Thanks

1

There are 1 answers

0
Matthias Pfefferle On

The first example (tel:) is an RFC standard: http://www.ietf.org/rfc/rfc3966.txt and, as far as I know, there is no "tel" attribute, so i would prefer the tel-URI.