The HTML writingsuggestions attribute
The HTML writingsuggestions attribute controls whether the browser offers inline writing suggestions — predictive text completions — in editable fields. Values are true and false. It is a global attribute; set it to false to switch the feature off for a field or a whole region.
Overview
Modern browsers can show grayed-out, inline suggestions that complete what the user is typing. The writingsuggestions attribute lets you control that per element: the default is true, and false disables it.
Because it is inherited, setting writingsuggestions="false" on a container turns suggestions off for everything inside. Disable it where suggestions are unwanted — sensitive fields, exact codes, or controlled inputs. Support is still rolling out, so treat it as an enhancement.
Values
| Value |
|---|
| true | false |
Example
<textarea writingsuggestions="false" rows="2" style="width:100%; padding:8px;">Writing suggestions are turned off here.</textarea>
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.