The form attribute on a <textarea> tag specifies the form the textarea is associated with.
The textarea will be included during the form submission.
A <textarea> element with a form attribute. Although outside the form, the textarea is included during form submission.
<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>
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.
<textarea form="form-id">
Value | Description |
---|---|
form-id | The id value of the form. |
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 |
Back to <textarea>