HTML writingsuggestions global attribute
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Thewritingsuggestionsglobal attribute is anenumerated 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.
Thewritingsuggestions 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.
In this article
Syntax
In browsers that support them, writing suggestions are enabled by default. To disable them, set thewritingsuggestions attribute's value tofalse. Setting the attribute's value totrue, or omitting the value, enables writing suggestions.
To disable writing suggestions:
<input type="text" writingsuggestions="false" />To enable writing suggestions:
<input type="text" /><input type="text" writingsuggestions /><input type="text" writingsuggestions="true" />Specifications
| Specification |
|---|
| HTML> # writing-suggestions> |
Browser compatibility
See also
autocompleteattributespellcheckattributecontenteditableattribute<textarea><input><datalist>andlistattribute