Dofactory.com
Dofactory.com

HTML <textarea> autocomplete Attribute

The autocomplete attribute on a <textarea> tag specifies to the browser that element is autocompleted with a previously entered values.

This attribute suggests values based on previously entered data by the user.

Example

#

An autocomplete attribute on a <textarea> tag.



<form action="/tutorial/action.html" >
  <textarea autocomplete="on" name="message" 
            placeholder="Enter message" 
            rows="3" cols="60"></textarea> <br /><br />

  <button type="submit">Submit</button>
</form>

Using autocomplete

Most browsers intentionally ignore autocomplete="off".


Syntax

<textarea autocomplete="on | off">

Values

#

Value Description
on Enables autocomplete in textarea.
off Disables autocomplete in textarea.

Browser support

Here is when autocomplete support started for each browser:

Chrome
17.0 Feb 2012
Firefox
2.0 Oct 2006
IE/Edge
6.0 Aug 2001
Opera
10.0 Oct 2009
Safari
5.1 Oct 2011

You may also like

 Back to <textarea>

Author: Jack Poorte
Published: Jun 20 2021
Last Reviewed: Sep 30 2023


Quick question: what's your favorite/least favorite part of Dofactory?


Guides