You’re reading the English version of this content since no translation exists yet for this locale. Help us translate this article!
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.
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
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of 'inputmode' in that specification. |
Living Standard |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
inputmode | Chrome Full support 66 | Edge No support No | Firefox No support No | IE No support No | Opera Full support 53 | Safari No support No | WebView Android Full support 66 | Chrome Android Full support 66 | Firefox Android No support No | Opera Android Full support 47 | Safari iOS Full support 12.2 | Samsung Internet Android Full support 9.0 |
Legend
- Full support
- Full support
- No support
- No support
See also
- All global attributes.