References

Beginner-friendly references for web development, with live, editable examples.

The HTML writingsuggestions attribute

Global attribute Works on every element Updated
Quick answer

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

Live 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.

Frequently asked questions

What does the writingsuggestions attribute do?
Controls whether the browser shows inline writing suggestions in editable fields.
Are these attributes guaranteed to work?
No. They are hints that browsers and on-screen keyboards may honor or ignore, especially on desktop.
Which elements do they apply to?
They are global attributes, but they mainly affect editable and form fields.
Is writingsuggestions a global attribute?
Yes — it is a global attribute, so it can be set on any HTML element (it is a global attribute), most usefully on editable and form fields.