HTML input name Attribute
HTML <input> tag
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
Syntax Example
Attribute Values
Value |
Description |
name/id |
Specifies the name of the input element. Naming rules:
- Must begin with a letter A-Z or a-z
- Can be followed by: letters (A-Za-z), digits (0-9), hyphens ("-"),
underscores ("_"), colons (":"), and periods (".")
- Values are case-sensitive
|
Browser Support

The attribute is supported in all major browsers.
Example
<form action="">
<input type="text" name="demo" />
</form>
|
Try-It-Yourself Demos
input name
attribute example
How use the name attribute with the input type="text".
HTML <input> tag
Whether you're new to XML or already an advanced user, the user-friendly views
and powerful entry helpers, wizards, and debuggers in XMLSpy are designed to
meet your XML and Web services development needs from start to finish.
- XML editor
- Graphical XML Schema / DTD editors
- XSLT 1.0/2.0 editor, debugger, profiler
- XQuery editor, debugger, profiler
- Support for Office Open XML (OOXML)
- Graphical WSDL editor & SOAP debugger
- Java, C#, C++ code generation
- And much more!
Download a fully functional free 30-day trial today!
|