HTML <input> Tag with the 'inputmode' Attribute

<input name="myInput" inputmode="numeric">

The above example demonstrates usage of the <input> element with the inputmode attribute.

The inputmode attribute is for telling devices with dynamic keyboards which keyboard to display. Therefore, you will need to view this page using a device with a dynamic keyboard (eg, a tablet or smartphone) in order to see the effect of the above example.

The inputmode attribute applies to the text, search and password input types as well as the <textarea> element.

Values

The following values can be used with the inputmode attribute:

ValueDescription
verbatimDefault. Alphanumeric Latin-script input of non-prose content, e.g. usernames, passwords, product codes.
latinLatin-script input in the user's preferred language(s), with some typing aids enabled (e.g. text prediction). Intended for human-to-computer communications, e.g. free-form text search fields.
latin-nameLatin-script input in the user's preferred language(s), with typing aids intended for entering human names enabled (e.g. text prediction from the user's contact list and automatic capitalisation at every word). Intended for situations such as customer name fields.
latin-proseLatin-script input in the user's preferred language(s), with aggressive typing aids intended for human-to-human communications enabled (e.g. text prediction and automatic capitalisation at the start of sentences). Intended for situations such as e-mails and instant messaging.
full-width-latinLatin-script input in the user's secondary language(s), using full-width characters, with aggressive typing aids intended for human-to-human communications enabled (e.g. text prediction and automatic capitalisation at the start of sentences). Intended for latin text embedded inside CJK text.
kanaKana or romaji input, typically hiragana input, using full-width characters, with support for converting to kanji. Intended for Japanese text input.
kana-nameKana or romaji input, typically hiragana input, using full-width characters, with support for converting to kanji, and with typing aids intended for entering human names enabled (e.g. text prediction from the user's contact list). Intended for situations such as customer name fields.
katakanaKatakana input, using full-width characters, with support for converting to kanji. Intended for Japanese text input.
numericNumeric input, including keys for the digits 0 to 9, the user's preferred thousands separator character, and the character for indicating negative numbers. Intended for numeric codes, e.g. credit card numbers. (For numbers, prefer <input type="number">.)
telTelephone number input, including keys for the digits 0 to 9, the "#" character, and the "*" character. In some locales, this can also include alphabetic mnemonic labels (e.g. in the US, the key labeled "2" is historically also labeled with the letters A, B, and C). Rarely necessary; use <input type="tel"> instead.
emailText input in the user's locale, with keys for aiding in the input of e-mail addresses, such as that for the "@" character and the "." character. Rarely necessary; use <input type="email"> instead.
urlText input in the user's locale, with keys for aiding in the input of Web addresses, such as that for the "/" and "." characters and for quick input of strings commonly found in domain names such as "www." or ".co.uk". Rarely necessary; use <input type="url"> instead.