Dofactory.com
Dofactory.com
Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

HTML <textarea> name Attribute

The name attribute on a <textarea> tag assigns a name to that textarea.

This name is used during form submission and as a reference for other purposes.

Example

#

A name attribute on a <textarea> element.
The textarea value (the text) is sent during form submission.



<form action="/tutorial/action.html">
  <label>Enter your message</label> <br />
  <textarea name="message" rows="3" cols="55">
  </textarea>

  <br />
  <input type="submit" value="Submit">
</form>

Using name

The name attribute specifies the textarea element's name.

Unlike id, the name does not have to be unique across the page.

This attribute can be used as reference for CSS, JavaScript, and form data after submitted.

Note: Only textarea elements with name attribute will be submitted as form data.


Syntax

<textarea name="name">

Values

#

name Description
name Sets the textarea element's name.

Browser support

Here is when name support started for each browser:

Chrome
1.0 Sep 2008
Firefox
1.0 Sep 2002
IE/Edge
1.0 Aug 1995
Opera
1.0 Jan 2006
Safari
1.0 Jan 2003

You may also like

 Back to <textarea>

Last updated on Sep 30, 2023

Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

Guides