Name

FOR — NN n/a IE 4 HTML 4

Synopsis

FOR=”inputElementIdentifier"

Optional

A unique identifier that is also assigned to the ID attribute of the INPUT element to which the label is to be associated. The FOR attribute is necessary only when you elect not to wrap the INPUT element inside the LABEL element, in which case the FOR attribute performs the binding between the two elements.

Example

<LABEL FOR="stateEntry">State:</LABEL>

Value

Case-sensitive identifier.

Default

None.

Object Model Reference

IE

[window.]document.all.elementID.htmlFor

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.