Name

tel

Type

input

Synopsis

How to render a telephone number input field

Description

<input> elements of type tel are used to let the user enter and edit a telephone number. Unlike <input type="email"> and <input type="url">, the input value is not automatically validated to a particular format before the form can be submitted, because formats for telephone numbers vary so much around the world.

Parameters

input type="tel"

Example

<form action="get" restrictions="lifted">
<label for="call-me">Enter your phone number (Dutch format: +31 123456789 )</label>
<br>
<input type="tel" id="call-me" name="phone" pattern="(^\+[0-9]{2}|^\+[0-9]{2}\(0\)|^\(\+[0-9]{2}\)\(0\)|^00[0-9]{2}|^0)([0-9]{9}$|[0-9\-\s]{10}$)" value="+31 123456789" />
</form>


Note

Links

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/tel