v150 · HTML · Input
Form Field Matrix
The right autocorrect setting depends on what the field collects. A natural-language comment box benefits from on; a code editor, username, or URL field needs off to avoid mangling identifiers. This matrix shows the recommended setting for each common field type — and lets you type into each to feel the difference.
| Field type | autocorrect | Why |
|---|---|---|
| Comment / prose | on | Natural language — OS corrections improve readability |
| Username | off | Exact match required — "johndoe" must not become "John Doe" |
| Password | off | Literal characters — any substitution breaks authentication |
| Email address | off | Structured syntax — "user@example.com" must not be altered |
| URL / slug | off | Path components have reserved characters that autocorrect mangles |
| Code editor | off | Identifiers, keywords — "innerHTML" must not become "inner HTML" |
| Search box | on | Users expect spell correction while querying |
| API key / token | off | Cryptographic strings — zero tolerance for substitution |
| Display name | on | Prose — capitalisation and corrections are welcome |
| Phone number | off | Numeric/symbolic — autocorrect changes nothing useful |
Try it — type in each field
comment (autocorrect="on")
on
Try misspellings — OS autocorrect should kick in on mobile
username (autocorrect="off")
off
Autocorrect disabled — underscores and lowercase preserved
code snippet (autocorrect="off")
off
Autocorrect off — identifiers and camelCase preserved
URL slug (autocorrect="off")
off
Autocorrect off — hyphens and lowercase stay intact
display name (autocorrect="on")
on
Autocorrect on — "smtih" → "Smith" welcome here
code
<!-- Natural language: autocorrect on (default in most contexts) -->
<textarea autocorrect="on"></textarea>
<!-- Structured / code / credentials: must be off -->
<input type="text" autocorrect="off" autocomplete="username">
<input type="text" autocorrect="off" name="api-key">
<textarea autocorrect="off"></textarea> <!-- code editor -->
<!-- Disable for an entire form -->
<form autocorrect="off">
<input type="text" name="slug">
<input type="text" name="token">
<!-- Individual field can re-enable if needed -->
<input type="text" name="bio" autocorrect="on">
</form>
// JS access (Chrome 150):
input.autocorrect; // "on" | "off"
input.autocorrect = "off";