The HTML enterkeyhint attribute
The HTML enterkeyhint attribute tells on-screen keyboards which label or icon to show on the Enter key, for example search, send, go, next or done. It is a global attribute used on form fields and editable elements to make multi-step forms feel native on mobile.
Overview
The enterkeyhint attribute customizes the action key on virtual keyboards so it matches what pressing Enter will actually do. A search box can show "Search", a chat field "Send", and a step in a wizard "Next".
It is purely a presentation hint for soft keyboards; it does not change behavior, so you still handle the key press in your own code. Pair it with inputmode for the best mobile typing experience.
Values
| Value |
|---|
| enter | done | go | next | previous | search | send |
Example
<input type="search" enterkeyhint="search" placeholder="Search…" style="padding:8px; width:100%;">
Best practices
- Use inputmode to bring up the right on-screen keyboard (numeric, email, and so on).
- Set autocapitalize appropriately: off for names and codes, sentences for prose.
- These are hints; do not rely on them for validation.
- Test on real mobile devices, where most of these take effect.























