If you are familiar with HTML, I believe you should have used the
<a /> tag before. In my own personal experience, I frequently use it for hyperlink to other pages, to launch email application and use it as a button.
<!-- Common hyperlink --> <a href="other_page.html" target="_blank">Normal Link</a> <!-- Launch Email App --> <a href="mailto:firstname.lastname@example.org?subject=Product%20Enquiry">Contact Us</a> <!-- This is how I create button in Bootstrap & Metronic theme --> <a href="#" id="btnPrint" class="btn blue">Print</a>
Did you know that there are other protocols that we can use in
HREF? Here’s what I found out recently.
1. Call Phone Number
We can create a hyperlink which will open the dialer to call a number. When the visitor click this hyperlink, it will automatically open up the phone program.
<a href="tel:64197576">Call 64197576</a>
Here’s what happen on my Android phone when I clicked above hyperlink.
2. Send SMS
With this hyperlink, we can send SMS to a phone number.
<a href="sms:80264444?body=test%20sms%20by%20url">SMS Me</a>
Here’s what happen when I clicked above hyperlink.
3. Call Skype Number
For Skype, we can configure to either use the phone number, or using the Skype name. We can also specifiy that we want to chat instead of calling. Here’s how:
<a href="skype:+6285714053333?call">Call Number with Skype</a> <a href="skype:skype_name?call">Call Skype User</a> <a href="skype:skype_name?chat">Chat with a Skype User</a>
What I don’t like with Skype is that will immediately call the number/contact. Who knows if the visitor is accidentally clicking the link, when the intended action was scrolling the page.
4. Launch Map
Before the explosion of smartphone, showing locations in a website means embedding the map in the page. In smartphone screen, this is not advisable. The small screen-estate would not enough for the embedded map. So what we should is creating a hyperlink which will auto launch the map application.
<!-- Only works in certain model of phone, e.g. iPhone --> <a href="maps:q=11%20Bedok%20North%20Ave%204">11 Bedok North Ave 4</a> <!-- Should works everywhere --> <a href="geo:1.334586, 103.950130">11 Bedok North Ave 4</a>
Only GEO works in my Android phone.
That’s all folks. I hope it helps, cheers!