Easy Tutorial
❮ Att Meta Content Att Area Rel ❯

HTML <input> name Attribute

HTML <input> Tag

Example

An HTML form with three input fields: two text fields and one submit button:


Browser Support

All major browsers support the name attribute.


Definition and Usage

The name attribute specifies the name of an <input> element.

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

Note: Only form elements with a name attribute will have their values passed when submitting a form.


Differences Between HTML 4.01 and HTML5

None.


Syntax

Attribute Values

Value Description
text Specifies the name of the <input> element.

❮ Att Meta Content Att Area Rel ❯