Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML button name attribute

HTML

HTML button Tag Reference HTML

 

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the name attribute.


Definition and Usage

The name attribute specifies a name for the button.

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

Tip: Different button elements can share the same name. This allows you to tag several buttons with the same name so that they can submit different values when used in a form.


Differences between HTML 4.01 and HTML5

NONE.


Syntax