HTML Attributes
HTML for attribute
On label, identifies a labelable control by ID. On output, lists IDs of controls contributing to the calculation. Do not include a # prefix. Applicable elements include: <label>, <output>. Check each element’s value rules.
Formal Syntax & Structure
html syntaxhtml
for="email"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| for | ID or space-separated IDs | On label, identifies a labelable control by ID. On output, lists IDs of controls contributing to the calculation. Do not include a # prefix. |
Working Example
Example Snippethtml
<label for="email">Email</label><input id="email" type="email">