by Andreas

HTML tag telling smartphones to dial a number for you

imageI wasn’t aware of this until today, and figured I’m either a bit slow or this might be something more of us are unfamiliar with. When developing web applications for smartphones or tablets with GSM capabilities you can create links of your phone numbers the same way you create email links that tell your default mail client to open up a “New email” window (href=”mailto: someone@thisaddress.com”)

By adding “tel:” to the anchor tag on your page, supporting devices (I’ve tested WP, iPhone and Android) will ask if you want to call the number you’ve clicked:

<a href="tel:+4722048700">Call us</a>

 

or

<a href="tel:+4722048700">+47 22 04 87 00</a>

 

(PS: don’t try calling that number. It’s belongs to the Royal Palace of Norway, and they’ll get the shits if you call and tell them you’re “just testing this new anchor tag!!”)