HTML <input> Tag with 'type=tel'
<form name="myForm" action="http://www.htmlcodes.ws/resources/html-forms-action.cfm"> <input type="tel" name="myTelField" value="12345678"> <button>Submit</button> </form>
The above example demonstrates usage of the
<input> element with the
type attribute set to
tel value represents a control for editing a telephone number given in the element's value.
tel type doesn't enforce a particular syntax. There are many different telephone formats all over the world with various requirements to do this effectively with one generic value. To enforce a particular format, you can use the
pattern attribute, which allows you to specify a regular expression against which the control's value.