Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a HTML telephone link accept spaces in the value?

Tags:

Is there anything wrong or problematic with including spaces as well as a plus symbol (for the international code) in a telephone link? Example:

<a href="tel:+46 000 00 00 00">+46 000 00 00 00</a>

(I replaced the actual number I want to use with 0s here)

like image 619
drake035 Avatar asked Mar 21 '17 09:03

drake035


People also ask

Can a Tel Link have spaces?

As you can see, the RFC clearly states: "tel" URIs MUST NOT use spaces in visual separators.

How do I format a Tel Link?

Href=tel: creates the call link. This tells the browser how to use the number. “Tel: 123-456-7890 “creates the HTML phone number. The number within the quotes is the number it will call.

How do you tel in HTML?

The <input type="tel"> defines a field for entering a telephone number. Note: Browsers that do not support "tel" fall back to being a standard "text" input. Tip: Always add the <label> tag for best accessibility practices!

What are telephone links?

What is a Tel Link? Tel link is a telephone link used on websites. Simply said, it makes your phone number clickable. Therefore, whenever the customer wants to contact you, he/she can click on the link and connect with your customer support right away.


1 Answers

HTML is irrelevant here. A URL is a URL no matter where you put it.

The relevant spec says:

even though ITU-T E.123 [E.123] recommends the use of space characters as visual separators in printed telephone numbers, "tel" URIs MUST NOT use spaces in visual separators to avoid excessive escaping.

So "no".

Even if a space was allowed, the general rules for URLs would mean that you would have to replace it with %20 (hence the comment about excessive escaping).

like image 157
Quentin Avatar answered Sep 25 '22 01:09

Quentin