coderef

enterkeyhintBaseline · Widely available

The enterkeyhint global HTML attribute sets the label for a virtual keyboard's Enter key. For example, enterkeyhint="search" may label the key with a magnifying glass icon.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Nov 2, 2021. Widely available since May 2, 2024.

Browser support

DesktopChrome
1–76Not supported
77+Supportedsince Sep 10, 2019
Current: 155
Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154
Firefox
1–93Not supported
94+Supportedsince Nov 2, 2021
Current: 157
Safari
1–13Not supported
13.1+Supportedsince Mar 24, 2020
Current: 27
MobileChrome Android
18–76Not supported
77+Supportedsince Sep 10, 2019
Current: 155
Firefox Android
4–93Not supported
94+Supportedsince Nov 2, 2021
Current: 157
Safari iOS
1–13Not supported
13.4+Supportedsince Mar 24, 2020
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: enterKeyHint.

Feature detection

JS · check before using
if ("HTMLElement" in globalThis && "enterKeyHint" in HTMLElement.prototype) {
  // HTMLElement.enterKeyHint is available
}

Sub-features

Support for each part of the feature (2). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
HTMLElement.enterKeyHint77799413.1779413.4
enterkeyhint77799413.1779413.4