coderef

autocapitalizeLimited availability

The autocapitalize global HTML attribute sets the virtual keyboard capitalization behavior for user input on an element, such as the first letter of sentences or all words.

Not yet supported in all major browsers — check the table and provide a fallback.

Browser support

DesktopChrome
1–65Not supported
66+Supportedsince Apr 17, 2018
Current: 155
Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154
Firefox
1–110Not supported
111+Supportedsince Mar 14, 2023
Current: 157
Safari
✕Not supportedup to 27
Current: 27
MobileChrome Android
18–65Not supported
66+Supportedsince Apr 17, 2018
Current: 155
Firefox Android
4–110Not supported
111+Supportedsince Mar 14, 2023
Current: 157
Safari iOS
1–10Not supported
10.3+Supportedsince Mar 27, 2017
Current: 27

How to use

Not supported in Safari. Use feature detection below and provide a fallback (or a polyfill) for those browsers.

Example

Full syntax and examples are on MDN: autocapitalize.

Feature detection

JS · check before using
if ("HTMLElement" in globalThis && "autocapitalize" in HTMLElement.prototype) {
  // HTMLElement.autocapitalize 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.autocapitalize6679111✕6611110.3
autocapitalize4379111✕4311110.3