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.
Is writingsuggestions guaranteed to work?
No. It is a hint; browsers that offer writing suggestions may honor it, and those that do not simply ignore it.
Which elements does writingsuggestions affect?
It is a global attribute, but it only matters where text is entered: form fields and elements with contenteditable. Setting it to false on an ancestor turns suggestions off for everything inside.
Is writingsuggestions a global attribute?
Yes, it is a global attribute, so it can be set on any HTML element, most usefully on editable and form fields.