Yes, you just use tel: as the link. eg:
<a href="tel:001122334455">0011 22 33 44 55</a>
Will that only show on mobile devices? I would like it to just be plain text on a laptop or tablet.
I suggest keeping it the same across all devices. Plenty of laptops and tablets can make phone calls these days, either on their own or through something like Continuity on macOS. Some third party apps like Skype or browser extensions might also be able to handle phone number links. The biggest concern used to be that clicking the link would result in an ugly error message but these days most – if not all – browsers will handle this more gracefully.
Ok, that’s a good point. Many thanks. Can I handle the error in any (simple) way e.g. a redirect to the contact page?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
I think Jacob was saying you shouldn’t be concerned of an error message when using a telephone link.
Ok, I do get an error on my laptop funnily enough but it works just as I want on my mobile.
That would be because your laptop doesn’t have any apps to handle phone calls.
To be honest, most people that have a laptop or desktop don’t expect to make phone calls from it. Phones are different and that’s why this still works.