2

I am working on a site with a "Call Us" link. Tapping on this link in a mobile device should call the phone number in the link.

For some reason, in Chrome on a Samsung Galaxy S8, tapping on the link opens a blank new page in the web browser instead of calling the number.

Here is the code:

<a 
  href="tel:+1888-888-8888"
  rel="noopener noreferrer" 
  alt="Phone number"
>
    888-888-8888
</a>
Phil Mok
  • 3,860
  • 6
  • 24
  • 36

2 Answers2

3

The issue on some android devices, if you have a target="_blank", it'll open in a new tab and not register the tel: link. If you specify target="_self" it'll open in the phone's default calling app. See the updated code below.

<a
  href="tel:+1888-888-8888"
  rel="noopener noreferrer" 
  alt="Phone number"
  target="_self"
>
    888-888-8888
</a>
Joseph Carey
  • 106
  • 1
  • 4
  • Or, since `_self` is the [default](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target), one could omit the target attribute. – Bob Stein Jan 30 '21 at 00:35
-1

Try "callto:" scheme. This seems to be a more common option.

AnrDaemon
  • 302
  • 2
  • 9