HTML <textarea> formAttribute
Example
A text area outside the form (but still part of the form):
<form action="demo-form.php" id="usrform">
Name: <input type="text" name="usrname">
<input type="submit">
</form>
<textarea name="comment" form="usrform">Enter content...</textarea>
Name: <input type="text" name="usrname">
<input type="submit">
</form>
<textarea name="comment" form="usrform">Enter content...</textarea>
Try it Yourself »
Browser Support
![]()
![]()
![]()
![]()
![]()
Except for Internet Explorer, all other major browsers support the form attribute.
Definition and Usage
The form attribute specifies one or more forms to which the text area belongs.
Differences between HTML 4.01 and HTML5
The form attribute is a new attribute in HTML5.
Syntax
<textarea form="form_id">
Attribute Values
| Value | Description |
|---|---|
| form_id | Specifies a space-separated list of ids of one or more forms to which the text area belongs. |
HTML <textarea> Tag Other Extensions