Horje
HTML inputmode Attribute

Definition and Usage

The inputmode attribute allows you to change the appearance of the keyboard on a phone or tablet (any device with a virtual keyboard).

Here is an input field wtih the input mode set so "numeric":

<input type="text" inputmode="numeric">

Result:

If you set inputmode to "email":

<input type="text" inputmode="email">

The result will be like this:

Applies to

The inputmode attribute is a Global Attribute, and can be used on any HTML element, but the element must be editable.

Element Attribute
All HTML elements inputmode

Browser Support


How to Show only numeric keys on the (virtual) keyboard

Run the example with a phone or tablet to see the result.
index.html
Example: HTML
 <input type="text" inputmode="numeric"> 

Output should be:

How to Show only numeric keys on the (virtual) keyboard




html inputmode attribute

Type:
Develop
Category:
Web Tutorial
Sub Category:
HTML Attribute
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference