HTML Attributes
HTML value attribute
Sets an initial form value, a submitted option value, a list item ordinal or a numeric meter/progress value depending on the element. Current control state may differ from the content attribute. Applicable elements include: <button>, <data>, <input>, <li>, <meter>, <option>, <progress>. Check each element’s value rules.
Formal Syntax & Structure
html syntaxhtml
value="2"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| value | element-dependent text or number | Sets an initial form value, a submitted option value, a list item ordinal or a numeric meter/progress value depending on the element. Current control state may differ from the content attribute. |
Working Example
Example Snippethtml
<label> Quantity <input type="number" name="qty" value="2"></label>