HTML Attributes
HTML name attribute
Provides an element-specific name: a form field key, radio group name, named frame, metadata key, slot name or other defined purpose. Its meaning depends on the element; it is not a unique DOM identifier. Applicable elements include: <button>, <details>, <fieldset>, <form>, <iframe>, <input>, <map>, <meta>, <object>, <output>, <select>, <slot>, <textarea>. Check each element’s value rules.
Formal Syntax & Structure
html syntaxhtml
name="q"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| name | string | Provides an element-specific name: a form field key, radio group name, named frame, metadata key, slot name or other defined purpose. Its meaning depends on the element; it is not a unique DOM identifier. |
Working Example
Example Snippethtml
<label> Search <input name="q"></label>Browser Compatibility
Minimum supported versions across modern rendering engines
Blink (modern)
Chrome
1
Yes
EdgeHTML / Blink
Edge
12
Yes
Gecko
Firefox
1
Yes
WebKit
Safari
1
Yes
Presto / Blink
Opera
≤12.1
Yes
Desktop support for name on input only; other elements, input types, individual values and mobile behavior may differ.
HTML Living Standard