Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it okay to use <input type="tel"/> now?

I'm working on a mobile phone web app and I have several text fields that could benefit from <input type="tel"/>. iPhones will adjust the keyboard for the user, but I'm worried about breaking backwards compatibility. What I'm hoping is that browsers/phone that support this can assist the user and other browser will fall back to a standard text field? Is this an acceptable practice? Does it even work?

like image 736
Michael Avatar asked May 11 '10 19:05

Michael


People also ask

What is input type TEL in HTML?

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!

Which input type is added in HTML5?

HTML 5 introduces several input types like Date, DateTime-local, time, week, month, email, tel, URL, search, range, color and number. To improve the user experience and to make the forms more interactive. However, if a browser failed to recognize these new input types, it will treat them like a normal text box.

Why E is allowed in input type number?

The E stands for the exponent, and it is used to shorten long numbers. Since the input is a math input and exponents are in math to shorten great numbers, so that's why there is an E.


1 Answers

Yes, any unsupported type will revert to the 'type=text' format.

I found a good page which lists out all the existing input types. I tried looking at it from different browsers, a bit interesting. Don't know if it will help you or not.

http://miketaylr.com/pres/html5/forms2.html

like image 128
animuson Avatar answered Sep 28 '22 05:09

animuson