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)
As you can see, the RFC clearly states: "tel" URIs MUST NOT use spaces in visual separators.
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.
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 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.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With