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

NameTypeDescription
forID or space-separated IDsOn 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">
HTML Reference