Paulund
2012-10-23 #html5

Add Telephone Number Links With HTML5

Normally telephone numbers are adding to web pages as just static text of digits which doesn't offer any interaction to your visitors. With more and more people using the internet on their mobile it's time to change your telephone numbers to clickable areas to call the number directly from your mobile phone. On your phone if you want to call a number of a web page you would have to copy and paste the number into your phone to dial it. With this new features you can make telephone numbers links to dial just like you can with emails. To allow your visitors to directly email you from a web page you place a link on the page and use the mailto: in the href.


<a href="mailto:[email protected]">Example Email</a>

Once clicked this link will open up your default mail client and create a new email with the to address populated with the email address is the href. To make telephone number clickable and to call the number from the link you use the tel: attribute with the number you want to dial.


<p>Book now, call <a href="tel:01234567890">01234 567 890</a></p>


<p>Book now, call <a href="tel:01234567890">01234 567 890</a></p>

Skype

To make the link open skype to make the call then you need to change the tel attribute to callto:.

<p>Book now, call <a href="callto:01234567890">01234 567 890</a></p>

Book now, call 01234 567 890