enterkeyhint global attribute
is an enumerated attribute defining what action label (or icon) to present for the enter key on virtual keyboards.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Form controls (such as
<input> elements) or elements using
contenteditable can specify an
inputmode attribute to control what kind of virtual keyboard
will be used. To further improve the user's experience, the enter key can be customized specifically by providing an
attribute indicating how the enter key should be labeled (or which icon should be shown). The enter key usually
represents what the user should do next; typical actions are: sending text, inserting a new line, or searching.
enterkeyhint attribute is an enumerated attribute and only accepts the following values:
(depends on user agent and user language)
||Typically inserting a new line.||↵|
||Typically meaning there is nothing more to input and the input method editor (IME) will be closed.||Done|
||Typically meaning to take the user to the target of the text they typed.||Open|
||Typically taking the user to the next field that will accept text.||Next|
||Typically taking the user to the previous field that will accept text.||Previous|
||Typically taking the user to the results of searching for the text they have typed.||Search|
||Typically delivering the text to its target.||Send|
BCD tables only load in the browser