English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag Directory

HTML: <textarea> form attribute

<textarea> form attribute specifies one or more forms to which the text area belongs. It is an HTML5 new attribute.

 HTML <textarea> tag

Online Example

Text area located outside the form (but still part of the form):

<form action="action_page.php" id="usrform">
  Name: <input type="text" name="usrname">
  <input type="submit">
</form>
<textarea name="comment" form="usrform">Enter text here...</textarea>
Test it out ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All mainstream browsers except Internet Explorer support the form attribute.

Definition and Usage

The form attribute specifies one or more forms that the text area belongs to.

HTML 4.01 between HTML5difference

The form attribute is an HTML5 with the new attribute.

Syntax

<textarea form="form_id">

Attribute Value

ValueDescription
form_idSpecify one or more form IDs that the text area belongs to, separated by spaces.
 HTML <textarea> tag