Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (20.3k points)

I need to build a web page for mobile devices. There's only one thing I still haven't figured out: how can I trigger a phone call through the click of text?

Is there a special URL I could enter like the mailto: tag for emails?

Device specific solution are not preferred.

I know iPhone automatically recognizes phone numbers and creates a link for this, but it would be great if this could be done for images too... and also for most mobile devices.

1 Answer

0 votes
by (40.7k points)

Most of the modern devices support the tel: scheme. So use 

<a href="tel:555-555-5555">555-555-5555</a> 

and you can use it too.

But, if you want to use it for an image, then the <a> tag can handle the <img/> placed in it just like other normal situations with : 

<a href="tel:555-55-5555"><img src="path/to/phoe/icon.jpg" /></a>

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...