Definition and Usage The name attribute is used to identify form data after it has been submitted. Unlike the unique id attribute, some inp...
Definition and Usage
The name attribute is used to identify form data after it has been submitted.Unlike the unique id attribute, some input types share the same name attribute (mostly used with the type="radio" input).
This attribute is required with all input types, except type="reset" and type="submit".
Only elements with the name attribute specified will have their values sent by the form element.
Syntax
<input name="name/id" /> |
Syntax Example
<input name="demo" /> |
Attribute Values
Value | Description |
---|---|
name/id | Specifies the name of the input element.Naming rules:
|
Browser Support
The attribute is supported in all major browsers.Example
<form action=""> <input type="text" name="demo" /> </form> |