<form name="myForm" action="http://www.PuStudy.Com/resources/html-forms-action.html"> <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.