Essentially, use an <a>
element with an href
attr pointing to the phone number prefixed by tel:
. Note that pluses can be used to specify country code, and hyphens can be included simply for human eyes.
MDN Web Docs
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#Creating_a_phone_link
The HTML
<a>
element (or anchor element), along with its href attribute, creates a hyperlink to other web pages, files, locations within the same page, email addresses, or any other URL.[…]
Offering phone links is helpful for users viewing web documents and laptops connected to phones.
<a href="tel:+491570156">+49 157 0156</a>
IETF Documents
https://tools.ietf.org/html/rfc3966
The
tel
URI for Telephone NumbersThe "tel" URI has the following syntax:
telephone-uri
="tel:"
telephone-subscriber[…]
Examples
tel:+1-201-555-0123
: This URI points to a phone number in the United States. The hyphens are included to make the number more human readable; they separate country, area code and subscriber number.
tel:7042;phone-context=example.com
: The URI describes a local phone number valid within the context "example.com".
tel:863-1234;phone-context=+1-914-555
: The URI describes a local phone number that is valid within a particular phone prefix.