HTML <textarea> nameAttribute

HTML textarea 标签参考手册HTML <textarea> Tag

Examples

A text area with a name attribute:

<form action="demo_form.html">
<textarea name="comment">Enter content...</textarea>
  <input type="submit">
</form>

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the name attribute.


Definition and Usage

The name attribute specifies a name for the text area.

The name attribute is used to reference elements in JavaScript, or to reference form data after a form is submitted.


Differences between HTML 4.01 and HTML5

None.


Syntax

<textarea name="text">

Attribute Values

Value Description
text Specifies the name of the text area.


HTML textarea 标签参考手册HTML <textarea> Tag Other Extensions