HTML <textarea> form Attribute

The form attribute on a <textarea> tag specifies the form the textarea is associated with. The textarea will be included during form submission.

Example

#

A form attribute on a <textarea> element.
Although outside the form, the textarea is included during form submission.

Product Information

<form action="/tutorial/action.html" id="product-form">
 <fieldset>
  <legend>Product Information</legend>
  <input type="text" name="product"
         placeholder="Product name"><br /><br />

  <input type="submit" value="Submit">
 </fieldset>
</form> 

<textarea form="product-form"
          placeholder="Description" cols="55"
          id="description" name="description" ></textarea>

Using form

The form attribute specifies the form the textarea is associated with.

The attribute value is the id of the form.

Once associated with a form, the textarea is included during form submission.


Syntax

<textarea form="form-id">

Values

#

Value Description
form-id The id value of the form.

Browser support

Here is when form support started for each browser:

Chrome
1.0 Sep 2008
Firefox
1.0 Sep 2002
IE/Edge
11.0 Oct 2013
Opera
1.0 Jan 2006
Safari
1.0 Jan 2003

You may also like

 Back to <textarea>
Guides