isNaN1247
isNaN1247

Reputation: 18099

'Can I use' label's "for" attribute functionality

Having Googled to no avail, I wondered if anyone knows of a list (similar to those of caniuse that indicates browser support for the for attribute of a label tag?

Specifically the functionality that allows a user to click a label and have the associated input (checkbox for example) to be ticked.

Upvotes: 0

Views: 165

Answers (2)

Tima
Tima

Reputation: 11

Just put like this.

<label><input type="radio" name="..">Choice 1</label>

When you click the label, it will check the radio/checkbox

Upvotes: 0

Quentin
Quentin

Reputation: 943510

Support has been excellent for years. So excellent that such a list is unnecessary.

Even if support wasn't available, the control itself would still be clickable so it wouldn't be a great loss.

Upvotes: 1

Related Questions