inputmode
Description
The inputmode attribute for HTML is an enumerated attribute that specifies what kind of input mechanism would be most helpful for users entering content.
Syntax
inputmode="value"
Value | Description |
---|---|
decimal | The user agent should display a virtual keyboard capable of fractional numeric input. Numeric keys and the format separator for the locale should be shown. |
The user agent should display a virtual keyboard capable of text 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. | |
none | The user agent should not display a virtual keyboard. This keyword is useful for content that renders its own keyboard control. |
numeric | The user agent should display a virtual keyboard capable of numeric input. This keyword is useful for PIN entry. |
search | The user agent should display a virtual keyboard optimized for search. |
tel | The user agent should display a virtual keyboard capable of telephone number input. This should 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). |
text | The user agent should display a virtual keyboard capable of text input in the user's locale. |
url | The user agent should display a virtual keyboard capable of text input in the user's locale, with keys for aiding in the input of URLs, such as that for the "/" and "." characters and for quick input of strings commonly found in domain names such as "www." or ".com". |
Examples
1 · decimal
2 · email
3 · none
4 · numeric
5 · search
6 · tel
7 · text
8 · url
Links
Attributes
- abbr
- accept
- accept-charset
- accesskey
- action
- alt
- as
- async
- autocapitalize
- autocomplete
- autofocus
- autoplay
- blocking
- charset
- checked
- cite
- class
- color
- cols
- colspan
- contenteditable
- controls
- coords
- crossorigin
- data
- datetime
- decoding
- default
- defer
- dir
- dirname
- disabled
- download
- draggable
- enctype
- enterkeyhint
- exportparts
- fetchpriority
- for
- form
- formaction
- formenctype
- formmethod
- formnovalidate
- formtarget
- headers
- height
- hidden
- high
- href
- hreflang
- http-equiv
- id
- imagesizes
- imagesrcset
- inert
- integrity
- is
- ismap
- itemid
- itemprop
- itemref
- itemscope
- itemtype
- kind
- label
- lang
- list
- loading
- loop
- low
- max
- maxlength
- media
- method
- min
- minlength
- multiple
- muted
- name
- nomodule
- nonce
- novalidate
- onabort
- onafterprint
- onauxclick
- onbeforeinput
- onbeforeprint
- onbeforetoggle
- onbeforeunload
- onblur
- oncancel
- oncanplay
- oncanplaythrough
- onchange
- onclick
- oncontextlost
- oncontextmenu
- oncontextrestored
- oncopy
- oncut
- ondblclick
- ondrag
- ondragend
- ondragenter
- ondragleave
- ondragover
- ondragstart
- ondrop
- ondurationchange
- onended
- onfocus
- onformdata
- onhashchange
- oninput
- oninvalid
- onkeydown
- onkeypress
- onkeyup
- onlanguagechange
- onload
- onloadeddata
- onloadedmetadata
- onloadstart
- onmousedown
- onmouseenter
- onmouseleave
- onmousemove
- onmouseout
- onmouseover
- onmouseup
- onmousewheel
- onoffline
- ononline
- onpagehide
- onpageshow
- onpaste
- onpause
- onplay
- onplaying
- onprogress
- onratechange
- onreset
- onresize
- onscroll
- onscrollend
- onsearch
- onseeked
- onseeking
- onselect
- onstorage
- onsubmit
- onsuspend
- ontimeupdate
- ontoggle
- onunload
- onvolumechange
- onwaiting
- onwheel
- open
- optimum
- part
- pattern
- ping
- placeholder
- playsinline
- popover
- popovertarget
- popovertargetaction
- poster
- preload
- readonly
- referrerpolicy
- rel
- required
- reversed
- rows
- rowspan
- sandbox
- scope
- selected
- shape
- size
- sizes
- slot
- span
- spellcheck
- src
- srcdoc
- srclang
- srcset
- start
- step
- style
- tabindex
- target
- title
- translate
- type
- usemap
- value
- width
- wrap