writingsuggestions
The writingsuggestions global attribute is an enumerated attribute indicating if browser-provided writing suggestions should be enabled under the scope of the element or not.
Some browsers provide writing suggestions to users as they type in editable fields. Suggestions usually appear as greyed-out text positioned after the text cursor, completing the user's sentence. While this can be helpful to users, developers might want to turn writing suggestions off in some cases, such as when providing site-specific writing suggestions.
The writingsuggestions attribute can be set on editable fields such as <input> or <textarea> elements, or on other HTML elements to control the behavior of the browser's suggestions on sections of a page, or on the entire page.
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| 124 | 124 | | 18 | 124 | 18 | |
| DOM API | ||||||
| The writingSuggestions property of the HTMLElement interface is a string indicating if browser-provided writing suggestions should be enabled under the scope of the element or not. | 124 | 124 | | 18 | 124 | 18 |
Syntax
<textarea writingsuggestions="false"
placeholder="コード入力(入力提案オフ)">
</textarea>
<textarea writingsuggestions="true"
placeholder="通常のテキスト入力">
</textarea> Live demo
Editorial note field
Enable writing suggestions on prose-heavy fields where rephrasing help is useful.
Good versus noisy fields
Show where writing suggestions add value and where they distract from exact input.
Attribute reference
Summarize the common pattern of pairing writing suggestions with spellcheck and autocomplete.
Use cases
-
Improve form input
Use writingsuggestions to make data entry more efficient, guided, or predictable inside real forms.
-
Reduce friction
Apply writingsuggestions when the browser can help users complete a task with fewer mistakes or less repetitive work.
Cautions
- Test writingsuggestions in your target browsers and input environments before depending on it as a primary behavior.
- Provide a fallback path or acceptable degradation strategy when support is still limited.
Accessibility
- Keep labels, instructions, validation, and keyboard behavior clear so the enhancement helps rather than surprises users.