Explore Bato Web Agency Webflow Certified Partner Profile Explore Bato Web Agency Webflow Certified Partner Profile

Which HTML input types provide the right mobile keyboard?

Illustration without a description Illustration without a description

Choose the HTML input type that matches the value’s meaning. Supporting mobile browsers can then provide a suitable keyboard, validation behavior and autofill hints. Use email, tel, url, number, date and related types only for data with those semantics.

 

An email field can expose the at-sign and support email validation. A telephone field can show a dial-style keypad without rejecting spaces, plus signs or formatting that real phone numbers need. A URL field may make slash and dot easier to enter. Search can label the keyboard action accordingly.

 

Do not use type="number" for postal codes, account numbers, one-time codes or credit card numbers. Number inputs can accept exponential notation, apply stepping and remove leading zeros. Use text with an appropriate inputmode and validation pattern for digit strings that are not quantities.

 

Native date and time controls vary across browsers, so test the supported platforms and provide clear format guidance or an alternative where needed. Pair types with accurate labels and autocomplete tokens. The keyboard is a convenience, not a replacement for server-side validation.

 

Test copy and paste, password managers, international values and hardware keyboards. A mobile keyboard layout is a browser hint and can vary by locale. Users must still be able to enter every valid value required by the business rules. Verify the behavior across the full width range, including spaces between design breakpoints. Long labels, translated copy and enlarged text can expose constraints that short sample content never reaches. Verify the behavior across the full width range, including spaces between design breakpoints. Long labels, translated copy and enlarged text can expose constraints that short sample content never reaches.