Easy Tutorial
❮ Av Event Error Av Event Play ❯

HTML <form> name Attribute

HTML <form> Tag

Example

HTML form with the name attribute:


Browser Support

All major browsers support the name attribute.


Definition and Usage

The name attribute specifies the name of the form.

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


Differences Between HTML 4.01 and HTML5

None.


Differences Between HTML and XHTML

In XHTML, the name attribute is deprecated. Use the id attribute instead.


Syntax

Attribute Values

Value Description
text Specifies the name of the form.
❮ Av Event Error Av Event Play ❯