The tel Type

The Current State of HTML5 Forms

<input type="tel">
(<input type=tel size=3>) <input type=tel size=3> - 
    <input type=tel size=4>

Live Demo


()


 


Firefox
4+

Safari
5+

Safari
iOS 3.1+

Chrome
6+

Opera
10.6+

IE
10+

Android
2.3+

The Low Down

The tel input type is for telephone numbers.

  • Because different countries have different phone number lengths and different ways of writing phone numbers, there is no single regular expression that would match all countries. Therefore, there are no default restrictions on valid values and by default browsers do no validation. For example, a random value like “abc” will pass validation.
  • If you need to enforce a specific syntax for acceptable phone number use the pattern attribute (RegEx validation).
  • Touch devices with touchpads display the phone keypad, which make it difficult, if not impossible, to enter anything invalid.
  • Falls back to a regular text input.
  • Doesn’t need to be a single field: For example, you can include three fields to emphasise USA’s area-code structure and simplify validation.

Our Cookie Policy and Privacy Policy outline how we use cookies to help personalize content, tailor and measure our marketing, and improve your user experience. I agree to use of cookies for these purposes.