Cheesetoast » tel http://www.cheesetoast.co.uk Brain Food for Web Developers Mon, 07 Jul 2014 23:18:22 +0000 en-US hourly 1 http://wordpress.org/?v=4.2.10 Adding HTML5 Telephone Numbers http://www.cheesetoast.co.uk/adding-html5-telephone-numbers/ http://www.cheesetoast.co.uk/adding-html5-telephone-numbers/#comments Mon, 20 Jan 2014 21:40:50 +0000 http://www.cheesetoast.co.uk/?p=1240 Using the href attribute, HTML5 offers a way to add phone numbers as an anchor link in the same way you can link to a url. Clicking on the number on a smartphone will initiate a call. Continue reading

The post Adding HTML5 Telephone Numbers appeared first on Cheesetoast.

]]>
Using the href attribute, HTML5 offers a way to add phone numbers as an anchor link in the same way you can link to a url. Clicking on the number on a smartphone will initiate a call.

Here’s an example:

<p>Call <a href="tel:+12095551234">555-1234</a></p>

Since your site can be viewed from any location you should include the international dialing prefix.

You can also add a extensions to the number by using a pause:

<p>Call <a href="tel:+12095551234p148">555-1234</a></p>

Tel or Skype

If you’d rather direct users to Skype you can use the callto: attribute like so:

<p>Call <a href="callto:+12095551234">555-1234</a></p>

The post Adding HTML5 Telephone Numbers appeared first on Cheesetoast.

]]>
http://www.cheesetoast.co.uk/adding-html5-telephone-numbers/feed/ 0