# for attribute

*noun*

say it: **“FOR AT-rih-byoot”** **/fɔːr ˈætrɪbjuːt/**

The attribute on a label that names the id of the field it describes, tying the two together.

## What is **`for` attribute**?

**`for` attribute** — The label attribute whose value matches the id of the control it labels.

## In a sentence

- “I matched the **for attribute** to the box's id, not to its name.”
- “The label's **for** said email, but the box's id was mail, so clicking the label did nothing.”

Level: Apprentice · [More HTML terms at this level](https://www.ask-codey.com/glossary?category=html&level=2)

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/for-attribute
