W3cubDocs

/HTML

input type="ode" (attribute)

The inputmode global attribute is an enumerated attribute that hints at the type of data that might be entered by the user while editing the element or its contents. It can have the following values:

none
No virtual keyboard. For when the page implements its own keyboard input control.
text (default value)
Standard input keyboard for the user's current locale.
decimal
Fractional numeric input keyboard containing the digits and decimal separator for the user's locale (typically . or ,). Devices may or may not show a minus key (-).
numeric
Numeric input keyboard, but only requires the digits 0–9. Devices may or may not show a minus key.
tel
A telephone keypad input, including the digits 0–9, the asterisk (*), and the pound (#) key. Inputs that require a telephone number should typically use <input type="tel">instead.
search
A virtual keyboard optimized for search input. For instance, the return/submit key may be labeled “Search”, along with possible other optimizations. Inputs that require a search query should typically use <input type="search"> instead.
email
A virtual keyboard optimized for entering email addresses. Typically includes the @ character as well as other optimizations. Inputs that require email addresses should typically use <input type="email"> instead.
url
A keypad optimized for entering URLs. This may have the / key more prominent, for example. Enhanced features could include history access and so on. Inputs that require a URL should typically use <input type="url"> instead.

Specifications

Browser compatibilityUpdate compatibility data on GitHub

Desktop
Chrome Edge Firefox Internet Explorer Opera Safari
inputmode 66 79 23
Disabled
23
Disabled
Before version 77, Firefox does not support inputmode when contenteditable is true.
Before version 75, Firefox accepts values from an earlier specification. From version 75, it accepts values from the WHATWG Living Standard. See bug 1509527.
Disabled From version 23: this feature is behind the dom.forms.inputmode preference (needs to be set to true). To change preferences in Firefox, visit about:config.
17 — 23
No 53 No
Mobile
Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
inputmode 66 66 79
79
68
Disabled
Disabled From version 68: this feature is behind the dom.forms.inputmode preference (needs to be set to true). To change preferences in Firefox, visit about:config.
47 12.2 9.0

See also

© 2005–2020 Mozilla and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode