Advertisement
Home Open Editor ❯

HTML <textarea> form Attribute

Example

<form action="action.php" id="form1">
  <input type="submit" value="Submit">
</form>

<textarea form="form1" name="textareaText">Hello world!</textarea>

Try this code ❯


Meaning

The form attribute should be set to a string that corresponds to the idid of the <form> element that an interactive control such as a button is associated with.

This allows form elements in one form to trigger actions in others.


Standard Syntax

<textarea form="formId">...</textarea>


Advertisement

Attribute Values

Value Description
formId Specifies the ID of a <form> element in the element’s owner
Home Open Editor ❯
Advertisement